{"version":3,"file":"index.iife.js","sources":["../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js","../node_modules/.pnpm/ieee754@1.2.1/node_modules/ieee754/index.js","../node_modules/.pnpm/buffer@6.0.3/node_modules/buffer/index.js","../node_modules/.pnpm/@noble+hashes@1.6.0/node_modules/@noble/hashes/esm/_assert.js","../node_modules/.pnpm/@noble+hashes@1.6.0/node_modules/@noble/hashes/esm/crypto.js","../node_modules/.pnpm/@noble+hashes@1.6.0/node_modules/@noble/hashes/esm/utils.js","../node_modules/.pnpm/@noble+hashes@1.6.0/node_modules/@noble/hashes/esm/_md.js","../node_modules/.pnpm/@noble+hashes@1.6.0/node_modules/@noble/hashes/esm/_u64.js","../node_modules/.pnpm/@noble+hashes@1.6.0/node_modules/@noble/hashes/esm/sha512.js","../node_modules/.pnpm/@noble+curves@1.7.0/node_modules/@noble/curves/esm/abstract/utils.js","../node_modules/.pnpm/@noble+curves@1.7.0/node_modules/@noble/curves/esm/abstract/modular.js","../node_modules/.pnpm/@noble+curves@1.7.0/node_modules/@noble/curves/esm/abstract/curve.js","../node_modules/.pnpm/@noble+curves@1.7.0/node_modules/@noble/curves/esm/abstract/edwards.js","../node_modules/.pnpm/@noble+curves@1.7.0/node_modules/@noble/curves/esm/ed25519.js","../src/utils/ed25519.ts","../src/utils/to-buffer.ts","../node_modules/.pnpm/bn.js@5.2.1/node_modules/bn.js/lib/bn.js","../node_modules/.pnpm/safe-buffer@5.2.1/node_modules/safe-buffer/index.js","../node_modules/.pnpm/base-x@3.0.11/node_modules/base-x/src/index.js","../node_modules/.pnpm/bs58@4.0.1/node_modules/bs58/index.js","../node_modules/.pnpm/@noble+hashes@1.6.1/node_modules/@noble/hashes/esm/_assert.js","../node_modules/.pnpm/@noble+hashes@1.6.1/node_modules/@noble/hashes/esm/utils.js","../node_modules/.pnpm/@noble+hashes@1.6.1/node_modules/@noble/hashes/esm/_md.js","../node_modules/.pnpm/@noble+hashes@1.6.1/node_modules/@noble/hashes/esm/sha256.js","../node_modules/.pnpm/text-encoding-utf-8@1.0.2/node_modules/text-encoding-utf-8/lib/encoding.lib.js","../node_modules/.pnpm/borsh@0.7.0/node_modules/borsh/lib/index.js","../src/utils/borsh-schema.ts","../src/publickey.ts","../src/account.ts","../src/bpf-loader-deprecated.ts","../node_modules/.pnpm/@solana+buffer-layout@4.0.1/node_modules/@solana/buffer-layout/lib/Layout.js","../src/transaction/constants.ts","../src/transaction/expiry-custom-errors.ts","../src/message/account-keys.ts","../src/layout.ts","../src/utils/shortvec-encoding.ts","../src/utils/assert.ts","../src/message/compiled-keys.ts","../src/utils/guarded-array-utils.ts","../src/message/legacy.ts","../src/message/v0.ts","../src/message/versioned.ts","../src/transaction/legacy.ts","../src/transaction/message.ts","../src/transaction/versioned.ts","../src/timing.ts","../src/sysvar.ts","../src/errors.ts","../src/utils/send-and-confirm-transaction.ts","../src/utils/sleep.ts","../src/instruction.ts","../src/fee-calculator.ts","../src/nonce-account.ts","../node_modules/.pnpm/@solana+errors@2.1.0_typescript@5.6.3/node_modules/@solana/errors/dist/index.browser.mjs","../node_modules/.pnpm/@solana+codecs-core@2.1.0_typescript@5.6.3/node_modules/@solana/codecs-core/dist/index.browser.mjs","../node_modules/.pnpm/@solana+codecs-numbers@2.1.0_typescript@5.6.3/node_modules/@solana/codecs-numbers/dist/index.browser.mjs","../src/utils/bigint.ts","../src/programs/system.ts","../src/loader.ts","../src/bpf-loader.ts","../node_modules/.pnpm/fast-stable-stringify@1.0.0/node_modules/fast-stable-stringify/index.js","../node_modules/.pnpm/superstruct@2.0.2/node_modules/superstruct/dist/index.mjs","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/rng.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/regex.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/validate.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/stringify.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v1.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/parse.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v35.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/md5.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v3.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v4.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/sha1.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/v5.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/nil.js","../node_modules/.pnpm/uuid@8.3.2/node_modules/uuid/dist/esm-browser/version.js","../node_modules/.pnpm/jayson@4.1.3_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/jayson/lib/generateRequest.js","../node_modules/.pnpm/jayson@4.1.3_bufferutil@4.0.8_utf-8-validate@5.0.10/node_modules/jayson/lib/client/browser/index.js","../src/epoch-schedule.ts","../src/__forks__/browser/fetch-impl.ts","../node_modules/.pnpm/eventemitter3@5.0.1/node_modules/eventemitter3/index.js","../node_modules/.pnpm/rpc-websockets@9.0.4/node_modules/rpc-websockets/dist/index.browser.mjs","../src/rpc-websocket.ts","../src/account-data.ts","../src/programs/address-lookup-table/state.ts","../src/utils/makeWebsocketUrl.ts","../src/connection.ts","../src/keypair.ts","../src/programs/address-lookup-table/index.ts","../src/programs/compute-budget.ts","../src/programs/ed25519.ts","../node_modules/.pnpm/@noble+hashes@1.6.1/node_modules/@noble/hashes/esm/_u64.js","../node_modules/.pnpm/@noble+hashes@1.6.1/node_modules/@noble/hashes/esm/sha3.js","../node_modules/.pnpm/@noble+hashes@1.6.0/node_modules/@noble/hashes/esm/sha256.js","../node_modules/.pnpm/@noble+hashes@1.6.0/node_modules/@noble/hashes/esm/hmac.js","../node_modules/.pnpm/@noble+curves@1.7.0/node_modules/@noble/curves/esm/abstract/weierstrass.js","../node_modules/.pnpm/@noble+curves@1.7.0/node_modules/@noble/curves/esm/_shortw_utils.js","../node_modules/.pnpm/@noble+curves@1.7.0/node_modules/@noble/curves/esm/secp256k1.js","../src/utils/secp256k1.ts","../src/programs/secp256k1.ts","../src/programs/stake.ts","../src/programs/vote.ts","../src/validator-info.ts","../src/vote-account.ts","../src/utils/cluster.ts","../src/utils/send-and-confirm-raw-transaction.ts","../src/index.ts"],"sourcesContent":["'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */\nexports.read = function (buffer, offset, isLE, mLen, nBytes) {\n var e, m\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var nBits = -7\n var i = isLE ? (nBytes - 1) : 0\n var d = isLE ? -1 : 1\n var s = buffer[offset + i]\n\n i += d\n\n e = s & ((1 << (-nBits)) - 1)\n s >>= (-nBits)\n nBits += eLen\n for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n m = e & ((1 << (-nBits)) - 1)\n e >>= (-nBits)\n nBits += mLen\n for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}\n\n if (e === 0) {\n e = 1 - eBias\n } else if (e === eMax) {\n return m ? NaN : ((s ? -1 : 1) * Infinity)\n } else {\n m = m + Math.pow(2, mLen)\n e = e - eBias\n }\n return (s ? -1 : 1) * m * Math.pow(2, e - mLen)\n}\n\nexports.write = function (buffer, value, offset, isLE, mLen, nBytes) {\n var e, m, c\n var eLen = (nBytes * 8) - mLen - 1\n var eMax = (1 << eLen) - 1\n var eBias = eMax >> 1\n var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)\n var i = isLE ? 0 : (nBytes - 1)\n var d = isLE ? 1 : -1\n var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0\n\n value = Math.abs(value)\n\n if (isNaN(value) || value === Infinity) {\n m = isNaN(value) ? 1 : 0\n e = eMax\n } else {\n e = Math.floor(Math.log(value) / Math.LN2)\n if (value * (c = Math.pow(2, -e)) < 1) {\n e--\n c *= 2\n }\n if (e + eBias >= 1) {\n value += rt / c\n } else {\n value += rt * Math.pow(2, 1 - eBias)\n }\n if (value * c >= 2) {\n e++\n c /= 2\n }\n\n if (e + eBias >= eMax) {\n m = 0\n e = eMax\n } else if (e + eBias >= 1) {\n m = ((value * c) - 1) * Math.pow(2, mLen)\n e = e + eBias\n } else {\n m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)\n e = 0\n }\n }\n\n for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}\n\n e = (e << mLen) | m\n eLen += mLen\n for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}\n\n buffer[offset + i - d] |= s * 128\n}\n","/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\n/* eslint-disable no-proto */\n\n'use strict'\n\nconst base64 = require('base64-js')\nconst ieee754 = require('ieee754')\nconst customInspectSymbol =\n (typeof Symbol === 'function' && typeof Symbol['for'] === 'function') // eslint-disable-line dot-notation\n ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation\n : null\n\nexports.Buffer = Buffer\nexports.SlowBuffer = SlowBuffer\nexports.INSPECT_MAX_BYTES = 50\n\nconst K_MAX_LENGTH = 0x7fffffff\nexports.kMaxLength = K_MAX_LENGTH\n\n/**\n * If `Buffer.TYPED_ARRAY_SUPPORT`:\n * === true Use Uint8Array implementation (fastest)\n * === false Print warning and recommend using `buffer` v4.x which has an Object\n * implementation (most compatible, even IE6)\n *\n * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+,\n * Opera 11.6+, iOS 4.2+.\n *\n * We report that the browser does not support typed arrays if the are not subclassable\n * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`\n * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support\n * for __proto__ and has a buggy typed array implementation.\n */\nBuffer.TYPED_ARRAY_SUPPORT = typedArraySupport()\n\nif (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' &&\n typeof console.error === 'function') {\n console.error(\n 'This browser lacks typed array (Uint8Array) support which is required by ' +\n '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'\n )\n}\n\nfunction typedArraySupport () {\n // Can typed array instances can be augmented?\n try {\n const arr = new Uint8Array(1)\n const proto = { foo: function () { return 42 } }\n Object.setPrototypeOf(proto, Uint8Array.prototype)\n Object.setPrototypeOf(arr, proto)\n return arr.foo() === 42\n } catch (e) {\n return false\n }\n}\n\nObject.defineProperty(Buffer.prototype, 'parent', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.buffer\n }\n})\n\nObject.defineProperty(Buffer.prototype, 'offset', {\n enumerable: true,\n get: function () {\n if (!Buffer.isBuffer(this)) return undefined\n return this.byteOffset\n }\n})\n\nfunction createBuffer (length) {\n if (length > K_MAX_LENGTH) {\n throw new RangeError('The value \"' + length + '\" is invalid for option \"size\"')\n }\n // Return an augmented `Uint8Array` instance\n const buf = new Uint8Array(length)\n Object.setPrototypeOf(buf, Buffer.prototype)\n return buf\n}\n\n/**\n * The Buffer constructor returns instances of `Uint8Array` that have their\n * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of\n * `Uint8Array`, so the returned instances will have all the node `Buffer` methods\n * and the `Uint8Array` methods. Square bracket notation works as expected -- it\n * returns a single octet.\n *\n * The `Uint8Array` prototype remains unmodified.\n */\n\nfunction Buffer (arg, encodingOrOffset, length) {\n // Common case.\n if (typeof arg === 'number') {\n if (typeof encodingOrOffset === 'string') {\n throw new TypeError(\n 'The \"string\" argument must be of type string. Received type number'\n )\n }\n return allocUnsafe(arg)\n }\n return from(arg, encodingOrOffset, length)\n}\n\nBuffer.poolSize = 8192 // not used by this implementation\n\nfunction from (value, encodingOrOffset, length) {\n if (typeof value === 'string') {\n return fromString(value, encodingOrOffset)\n }\n\n if (ArrayBuffer.isView(value)) {\n return fromArrayView(value)\n }\n\n if (value == null) {\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n }\n\n if (isInstance(value, ArrayBuffer) ||\n (value && isInstance(value.buffer, ArrayBuffer))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof SharedArrayBuffer !== 'undefined' &&\n (isInstance(value, SharedArrayBuffer) ||\n (value && isInstance(value.buffer, SharedArrayBuffer)))) {\n return fromArrayBuffer(value, encodingOrOffset, length)\n }\n\n if (typeof value === 'number') {\n throw new TypeError(\n 'The \"value\" argument must not be of type number. Received type number'\n )\n }\n\n const valueOf = value.valueOf && value.valueOf()\n if (valueOf != null && valueOf !== value) {\n return Buffer.from(valueOf, encodingOrOffset, length)\n }\n\n const b = fromObject(value)\n if (b) return b\n\n if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null &&\n typeof value[Symbol.toPrimitive] === 'function') {\n return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length)\n }\n\n throw new TypeError(\n 'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +\n 'or Array-like Object. Received type ' + (typeof value)\n )\n}\n\n/**\n * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError\n * if value is a number.\n * Buffer.from(str[, encoding])\n * Buffer.from(array)\n * Buffer.from(buffer)\n * Buffer.from(arrayBuffer[, byteOffset[, length]])\n **/\nBuffer.from = function (value, encodingOrOffset, length) {\n return from(value, encodingOrOffset, length)\n}\n\n// Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:\n// https://github.com/feross/buffer/pull/148\nObject.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)\nObject.setPrototypeOf(Buffer, Uint8Array)\n\nfunction assertSize (size) {\n if (typeof size !== 'number') {\n throw new TypeError('\"size\" argument must be of type number')\n } else if (size < 0) {\n throw new RangeError('The value \"' + size + '\" is invalid for option \"size\"')\n }\n}\n\nfunction alloc (size, fill, encoding) {\n assertSize(size)\n if (size <= 0) {\n return createBuffer(size)\n }\n if (fill !== undefined) {\n // Only pay attention to encoding if it's a string. This\n // prevents accidentally sending in a number that would\n // be interpreted as a start offset.\n return typeof encoding === 'string'\n ? createBuffer(size).fill(fill, encoding)\n : createBuffer(size).fill(fill)\n }\n return createBuffer(size)\n}\n\n/**\n * Creates a new filled Buffer instance.\n * alloc(size[, fill[, encoding]])\n **/\nBuffer.alloc = function (size, fill, encoding) {\n return alloc(size, fill, encoding)\n}\n\nfunction allocUnsafe (size) {\n assertSize(size)\n return createBuffer(size < 0 ? 0 : checked(size) | 0)\n}\n\n/**\n * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.\n * */\nBuffer.allocUnsafe = function (size) {\n return allocUnsafe(size)\n}\n/**\n * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.\n */\nBuffer.allocUnsafeSlow = function (size) {\n return allocUnsafe(size)\n}\n\nfunction fromString (string, encoding) {\n if (typeof encoding !== 'string' || encoding === '') {\n encoding = 'utf8'\n }\n\n if (!Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n\n const length = byteLength(string, encoding) | 0\n let buf = createBuffer(length)\n\n const actual = buf.write(string, encoding)\n\n if (actual !== length) {\n // Writing a hex string, for example, that contains invalid characters will\n // cause everything after the first invalid character to be ignored. (e.g.\n // 'abxxcd' will be treated as 'ab')\n buf = buf.slice(0, actual)\n }\n\n return buf\n}\n\nfunction fromArrayLike (array) {\n const length = array.length < 0 ? 0 : checked(array.length) | 0\n const buf = createBuffer(length)\n for (let i = 0; i < length; i += 1) {\n buf[i] = array[i] & 255\n }\n return buf\n}\n\nfunction fromArrayView (arrayView) {\n if (isInstance(arrayView, Uint8Array)) {\n const copy = new Uint8Array(arrayView)\n return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength)\n }\n return fromArrayLike(arrayView)\n}\n\nfunction fromArrayBuffer (array, byteOffset, length) {\n if (byteOffset < 0 || array.byteLength < byteOffset) {\n throw new RangeError('\"offset\" is outside of buffer bounds')\n }\n\n if (array.byteLength < byteOffset + (length || 0)) {\n throw new RangeError('\"length\" is outside of buffer bounds')\n }\n\n let buf\n if (byteOffset === undefined && length === undefined) {\n buf = new Uint8Array(array)\n } else if (length === undefined) {\n buf = new Uint8Array(array, byteOffset)\n } else {\n buf = new Uint8Array(array, byteOffset, length)\n }\n\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(buf, Buffer.prototype)\n\n return buf\n}\n\nfunction fromObject (obj) {\n if (Buffer.isBuffer(obj)) {\n const len = checked(obj.length) | 0\n const buf = createBuffer(len)\n\n if (buf.length === 0) {\n return buf\n }\n\n obj.copy(buf, 0, 0, len)\n return buf\n }\n\n if (obj.length !== undefined) {\n if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) {\n return createBuffer(0)\n }\n return fromArrayLike(obj)\n }\n\n if (obj.type === 'Buffer' && Array.isArray(obj.data)) {\n return fromArrayLike(obj.data)\n }\n}\n\nfunction checked (length) {\n // Note: cannot use `length < K_MAX_LENGTH` here because that fails when\n // length is NaN (which is otherwise coerced to zero.)\n if (length >= K_MAX_LENGTH) {\n throw new RangeError('Attempt to allocate Buffer larger than maximum ' +\n 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes')\n }\n return length | 0\n}\n\nfunction SlowBuffer (length) {\n if (+length != length) { // eslint-disable-line eqeqeq\n length = 0\n }\n return Buffer.alloc(+length)\n}\n\nBuffer.isBuffer = function isBuffer (b) {\n return b != null && b._isBuffer === true &&\n b !== Buffer.prototype // so Buffer.isBuffer(Buffer.prototype) will be false\n}\n\nBuffer.compare = function compare (a, b) {\n if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength)\n if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength)\n if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) {\n throw new TypeError(\n 'The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array'\n )\n }\n\n if (a === b) return 0\n\n let x = a.length\n let y = b.length\n\n for (let i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i]\n y = b[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\nBuffer.isEncoding = function isEncoding (encoding) {\n switch (String(encoding).toLowerCase()) {\n case 'hex':\n case 'utf8':\n case 'utf-8':\n case 'ascii':\n case 'latin1':\n case 'binary':\n case 'base64':\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return true\n default:\n return false\n }\n}\n\nBuffer.concat = function concat (list, length) {\n if (!Array.isArray(list)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n }\n\n if (list.length === 0) {\n return Buffer.alloc(0)\n }\n\n let i\n if (length === undefined) {\n length = 0\n for (i = 0; i < list.length; ++i) {\n length += list[i].length\n }\n }\n\n const buffer = Buffer.allocUnsafe(length)\n let pos = 0\n for (i = 0; i < list.length; ++i) {\n let buf = list[i]\n if (isInstance(buf, Uint8Array)) {\n if (pos + buf.length > buffer.length) {\n if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf)\n buf.copy(buffer, pos)\n } else {\n Uint8Array.prototype.set.call(\n buffer,\n buf,\n pos\n )\n }\n } else if (!Buffer.isBuffer(buf)) {\n throw new TypeError('\"list\" argument must be an Array of Buffers')\n } else {\n buf.copy(buffer, pos)\n }\n pos += buf.length\n }\n return buffer\n}\n\nfunction byteLength (string, encoding) {\n if (Buffer.isBuffer(string)) {\n return string.length\n }\n if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) {\n return string.byteLength\n }\n if (typeof string !== 'string') {\n throw new TypeError(\n 'The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. ' +\n 'Received type ' + typeof string\n )\n }\n\n const len = string.length\n const mustMatch = (arguments.length > 2 && arguments[2] === true)\n if (!mustMatch && len === 0) return 0\n\n // Use a for loop to avoid recursion\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'ascii':\n case 'latin1':\n case 'binary':\n return len\n case 'utf8':\n case 'utf-8':\n return utf8ToBytes(string).length\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return len * 2\n case 'hex':\n return len >>> 1\n case 'base64':\n return base64ToBytes(string).length\n default:\n if (loweredCase) {\n return mustMatch ? -1 : utf8ToBytes(string).length // assume utf8\n }\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\nBuffer.byteLength = byteLength\n\nfunction slowToString (encoding, start, end) {\n let loweredCase = false\n\n // No need to verify that \"this.length <= MAX_UINT32\" since it's a read-only\n // property of a typed array.\n\n // This behaves neither like String nor Uint8Array in that we set start/end\n // to their upper/lower bounds if the value passed is out of range.\n // undefined is handled specially as per ECMA-262 6th Edition,\n // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.\n if (start === undefined || start < 0) {\n start = 0\n }\n // Return early if start > this.length. Done here to prevent potential uint32\n // coercion fail below.\n if (start > this.length) {\n return ''\n }\n\n if (end === undefined || end > this.length) {\n end = this.length\n }\n\n if (end <= 0) {\n return ''\n }\n\n // Force coercion to uint32. This will also coerce falsey/NaN values to 0.\n end >>>= 0\n start >>>= 0\n\n if (end <= start) {\n return ''\n }\n\n if (!encoding) encoding = 'utf8'\n\n while (true) {\n switch (encoding) {\n case 'hex':\n return hexSlice(this, start, end)\n\n case 'utf8':\n case 'utf-8':\n return utf8Slice(this, start, end)\n\n case 'ascii':\n return asciiSlice(this, start, end)\n\n case 'latin1':\n case 'binary':\n return latin1Slice(this, start, end)\n\n case 'base64':\n return base64Slice(this, start, end)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return utf16leSlice(this, start, end)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = (encoding + '').toLowerCase()\n loweredCase = true\n }\n }\n}\n\n// This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)\n// to detect a Buffer instance. It's not possible to use `instanceof Buffer`\n// reliably in a browserify context because there could be multiple different\n// copies of the 'buffer' package in use. This method works even for Buffer\n// instances that were created from another copy of the `buffer` package.\n// See: https://github.com/feross/buffer/issues/154\nBuffer.prototype._isBuffer = true\n\nfunction swap (b, n, m) {\n const i = b[n]\n b[n] = b[m]\n b[m] = i\n}\n\nBuffer.prototype.swap16 = function swap16 () {\n const len = this.length\n if (len % 2 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 16-bits')\n }\n for (let i = 0; i < len; i += 2) {\n swap(this, i, i + 1)\n }\n return this\n}\n\nBuffer.prototype.swap32 = function swap32 () {\n const len = this.length\n if (len % 4 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 32-bits')\n }\n for (let i = 0; i < len; i += 4) {\n swap(this, i, i + 3)\n swap(this, i + 1, i + 2)\n }\n return this\n}\n\nBuffer.prototype.swap64 = function swap64 () {\n const len = this.length\n if (len % 8 !== 0) {\n throw new RangeError('Buffer size must be a multiple of 64-bits')\n }\n for (let i = 0; i < len; i += 8) {\n swap(this, i, i + 7)\n swap(this, i + 1, i + 6)\n swap(this, i + 2, i + 5)\n swap(this, i + 3, i + 4)\n }\n return this\n}\n\nBuffer.prototype.toString = function toString () {\n const length = this.length\n if (length === 0) return ''\n if (arguments.length === 0) return utf8Slice(this, 0, length)\n return slowToString.apply(this, arguments)\n}\n\nBuffer.prototype.toLocaleString = Buffer.prototype.toString\n\nBuffer.prototype.equals = function equals (b) {\n if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer')\n if (this === b) return true\n return Buffer.compare(this, b) === 0\n}\n\nBuffer.prototype.inspect = function inspect () {\n let str = ''\n const max = exports.INSPECT_MAX_BYTES\n str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim()\n if (this.length > max) str += ' ... '\n return ''\n}\nif (customInspectSymbol) {\n Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect\n}\n\nBuffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {\n if (isInstance(target, Uint8Array)) {\n target = Buffer.from(target, target.offset, target.byteLength)\n }\n if (!Buffer.isBuffer(target)) {\n throw new TypeError(\n 'The \"target\" argument must be one of type Buffer or Uint8Array. ' +\n 'Received type ' + (typeof target)\n )\n }\n\n if (start === undefined) {\n start = 0\n }\n if (end === undefined) {\n end = target ? target.length : 0\n }\n if (thisStart === undefined) {\n thisStart = 0\n }\n if (thisEnd === undefined) {\n thisEnd = this.length\n }\n\n if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) {\n throw new RangeError('out of range index')\n }\n\n if (thisStart >= thisEnd && start >= end) {\n return 0\n }\n if (thisStart >= thisEnd) {\n return -1\n }\n if (start >= end) {\n return 1\n }\n\n start >>>= 0\n end >>>= 0\n thisStart >>>= 0\n thisEnd >>>= 0\n\n if (this === target) return 0\n\n let x = thisEnd - thisStart\n let y = end - start\n const len = Math.min(x, y)\n\n const thisCopy = this.slice(thisStart, thisEnd)\n const targetCopy = target.slice(start, end)\n\n for (let i = 0; i < len; ++i) {\n if (thisCopy[i] !== targetCopy[i]) {\n x = thisCopy[i]\n y = targetCopy[i]\n break\n }\n }\n\n if (x < y) return -1\n if (y < x) return 1\n return 0\n}\n\n// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,\n// OR the last index of `val` in `buffer` at offset <= `byteOffset`.\n//\n// Arguments:\n// - buffer - a Buffer to search\n// - val - a string, Buffer, or number\n// - byteOffset - an index into `buffer`; will be clamped to an int32\n// - encoding - an optional encoding, relevant is val is a string\n// - dir - true for indexOf, false for lastIndexOf\nfunction bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {\n // Empty buffer means no match\n if (buffer.length === 0) return -1\n\n // Normalize byteOffset\n if (typeof byteOffset === 'string') {\n encoding = byteOffset\n byteOffset = 0\n } else if (byteOffset > 0x7fffffff) {\n byteOffset = 0x7fffffff\n } else if (byteOffset < -0x80000000) {\n byteOffset = -0x80000000\n }\n byteOffset = +byteOffset // Coerce to Number.\n if (numberIsNaN(byteOffset)) {\n // byteOffset: it it's undefined, null, NaN, \"foo\", etc, search whole buffer\n byteOffset = dir ? 0 : (buffer.length - 1)\n }\n\n // Normalize byteOffset: negative offsets start from the end of the buffer\n if (byteOffset < 0) byteOffset = buffer.length + byteOffset\n if (byteOffset >= buffer.length) {\n if (dir) return -1\n else byteOffset = buffer.length - 1\n } else if (byteOffset < 0) {\n if (dir) byteOffset = 0\n else return -1\n }\n\n // Normalize val\n if (typeof val === 'string') {\n val = Buffer.from(val, encoding)\n }\n\n // Finally, search either indexOf (if dir is true) or lastIndexOf\n if (Buffer.isBuffer(val)) {\n // Special case: looking for empty string/buffer always fails\n if (val.length === 0) {\n return -1\n }\n return arrayIndexOf(buffer, val, byteOffset, encoding, dir)\n } else if (typeof val === 'number') {\n val = val & 0xFF // Search for a byte value [0-255]\n if (typeof Uint8Array.prototype.indexOf === 'function') {\n if (dir) {\n return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset)\n } else {\n return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)\n }\n }\n return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)\n }\n\n throw new TypeError('val must be string, number or Buffer')\n}\n\nfunction arrayIndexOf (arr, val, byteOffset, encoding, dir) {\n let indexSize = 1\n let arrLength = arr.length\n let valLength = val.length\n\n if (encoding !== undefined) {\n encoding = String(encoding).toLowerCase()\n if (encoding === 'ucs2' || encoding === 'ucs-2' ||\n encoding === 'utf16le' || encoding === 'utf-16le') {\n if (arr.length < 2 || val.length < 2) {\n return -1\n }\n indexSize = 2\n arrLength /= 2\n valLength /= 2\n byteOffset /= 2\n }\n }\n\n function read (buf, i) {\n if (indexSize === 1) {\n return buf[i]\n } else {\n return buf.readUInt16BE(i * indexSize)\n }\n }\n\n let i\n if (dir) {\n let foundIndex = -1\n for (i = byteOffset; i < arrLength; i++) {\n if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {\n if (foundIndex === -1) foundIndex = i\n if (i - foundIndex + 1 === valLength) return foundIndex * indexSize\n } else {\n if (foundIndex !== -1) i -= i - foundIndex\n foundIndex = -1\n }\n }\n } else {\n if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength\n for (i = byteOffset; i >= 0; i--) {\n let found = true\n for (let j = 0; j < valLength; j++) {\n if (read(arr, i + j) !== read(val, j)) {\n found = false\n break\n }\n }\n if (found) return i\n }\n }\n\n return -1\n}\n\nBuffer.prototype.includes = function includes (val, byteOffset, encoding) {\n return this.indexOf(val, byteOffset, encoding) !== -1\n}\n\nBuffer.prototype.indexOf = function indexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, true)\n}\n\nBuffer.prototype.lastIndexOf = function lastIndexOf (val, byteOffset, encoding) {\n return bidirectionalIndexOf(this, val, byteOffset, encoding, false)\n}\n\nfunction hexWrite (buf, string, offset, length) {\n offset = Number(offset) || 0\n const remaining = buf.length - offset\n if (!length) {\n length = remaining\n } else {\n length = Number(length)\n if (length > remaining) {\n length = remaining\n }\n }\n\n const strLen = string.length\n\n if (length > strLen / 2) {\n length = strLen / 2\n }\n let i\n for (i = 0; i < length; ++i) {\n const parsed = parseInt(string.substr(i * 2, 2), 16)\n if (numberIsNaN(parsed)) return i\n buf[offset + i] = parsed\n }\n return i\n}\n\nfunction utf8Write (buf, string, offset, length) {\n return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nfunction asciiWrite (buf, string, offset, length) {\n return blitBuffer(asciiToBytes(string), buf, offset, length)\n}\n\nfunction base64Write (buf, string, offset, length) {\n return blitBuffer(base64ToBytes(string), buf, offset, length)\n}\n\nfunction ucs2Write (buf, string, offset, length) {\n return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length)\n}\n\nBuffer.prototype.write = function write (string, offset, length, encoding) {\n // Buffer#write(string)\n if (offset === undefined) {\n encoding = 'utf8'\n length = this.length\n offset = 0\n // Buffer#write(string, encoding)\n } else if (length === undefined && typeof offset === 'string') {\n encoding = offset\n length = this.length\n offset = 0\n // Buffer#write(string, offset[, length][, encoding])\n } else if (isFinite(offset)) {\n offset = offset >>> 0\n if (isFinite(length)) {\n length = length >>> 0\n if (encoding === undefined) encoding = 'utf8'\n } else {\n encoding = length\n length = undefined\n }\n } else {\n throw new Error(\n 'Buffer.write(string, encoding, offset[, length]) is no longer supported'\n )\n }\n\n const remaining = this.length - offset\n if (length === undefined || length > remaining) length = remaining\n\n if ((string.length > 0 && (length < 0 || offset < 0)) || offset > this.length) {\n throw new RangeError('Attempt to write outside buffer bounds')\n }\n\n if (!encoding) encoding = 'utf8'\n\n let loweredCase = false\n for (;;) {\n switch (encoding) {\n case 'hex':\n return hexWrite(this, string, offset, length)\n\n case 'utf8':\n case 'utf-8':\n return utf8Write(this, string, offset, length)\n\n case 'ascii':\n case 'latin1':\n case 'binary':\n return asciiWrite(this, string, offset, length)\n\n case 'base64':\n // Warning: maxLength not taken into account in base64Write\n return base64Write(this, string, offset, length)\n\n case 'ucs2':\n case 'ucs-2':\n case 'utf16le':\n case 'utf-16le':\n return ucs2Write(this, string, offset, length)\n\n default:\n if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding)\n encoding = ('' + encoding).toLowerCase()\n loweredCase = true\n }\n }\n}\n\nBuffer.prototype.toJSON = function toJSON () {\n return {\n type: 'Buffer',\n data: Array.prototype.slice.call(this._arr || this, 0)\n }\n}\n\nfunction base64Slice (buf, start, end) {\n if (start === 0 && end === buf.length) {\n return base64.fromByteArray(buf)\n } else {\n return base64.fromByteArray(buf.slice(start, end))\n }\n}\n\nfunction utf8Slice (buf, start, end) {\n end = Math.min(buf.length, end)\n const res = []\n\n let i = start\n while (i < end) {\n const firstByte = buf[i]\n let codePoint = null\n let bytesPerSequence = (firstByte > 0xEF)\n ? 4\n : (firstByte > 0xDF)\n ? 3\n : (firstByte > 0xBF)\n ? 2\n : 1\n\n if (i + bytesPerSequence <= end) {\n let secondByte, thirdByte, fourthByte, tempCodePoint\n\n switch (bytesPerSequence) {\n case 1:\n if (firstByte < 0x80) {\n codePoint = firstByte\n }\n break\n case 2:\n secondByte = buf[i + 1]\n if ((secondByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0x1F) << 0x6 | (secondByte & 0x3F)\n if (tempCodePoint > 0x7F) {\n codePoint = tempCodePoint\n }\n }\n break\n case 3:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | (thirdByte & 0x3F)\n if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) {\n codePoint = tempCodePoint\n }\n }\n break\n case 4:\n secondByte = buf[i + 1]\n thirdByte = buf[i + 2]\n fourthByte = buf[i + 3]\n if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) {\n tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | (fourthByte & 0x3F)\n if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) {\n codePoint = tempCodePoint\n }\n }\n }\n }\n\n if (codePoint === null) {\n // we did not generate a valid codePoint so insert a\n // replacement char (U+FFFD) and advance only 1 byte\n codePoint = 0xFFFD\n bytesPerSequence = 1\n } else if (codePoint > 0xFFFF) {\n // encode to utf16 (surrogate pair dance)\n codePoint -= 0x10000\n res.push(codePoint >>> 10 & 0x3FF | 0xD800)\n codePoint = 0xDC00 | codePoint & 0x3FF\n }\n\n res.push(codePoint)\n i += bytesPerSequence\n }\n\n return decodeCodePointsArray(res)\n}\n\n// Based on http://stackoverflow.com/a/22747272/680742, the browser with\n// the lowest limit is Chrome, with 0x10000 args.\n// We go 1 magnitude less, for safety\nconst MAX_ARGUMENTS_LENGTH = 0x1000\n\nfunction decodeCodePointsArray (codePoints) {\n const len = codePoints.length\n if (len <= MAX_ARGUMENTS_LENGTH) {\n return String.fromCharCode.apply(String, codePoints) // avoid extra slice()\n }\n\n // Decode in chunks to avoid \"call stack size exceeded\".\n let res = ''\n let i = 0\n while (i < len) {\n res += String.fromCharCode.apply(\n String,\n codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)\n )\n }\n return res\n}\n\nfunction asciiSlice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i] & 0x7F)\n }\n return ret\n}\n\nfunction latin1Slice (buf, start, end) {\n let ret = ''\n end = Math.min(buf.length, end)\n\n for (let i = start; i < end; ++i) {\n ret += String.fromCharCode(buf[i])\n }\n return ret\n}\n\nfunction hexSlice (buf, start, end) {\n const len = buf.length\n\n if (!start || start < 0) start = 0\n if (!end || end < 0 || end > len) end = len\n\n let out = ''\n for (let i = start; i < end; ++i) {\n out += hexSliceLookupTable[buf[i]]\n }\n return out\n}\n\nfunction utf16leSlice (buf, start, end) {\n const bytes = buf.slice(start, end)\n let res = ''\n // If bytes.length is odd, the last 8 bits must be ignored (same as node.js)\n for (let i = 0; i < bytes.length - 1; i += 2) {\n res += String.fromCharCode(bytes[i] + (bytes[i + 1] * 256))\n }\n return res\n}\n\nBuffer.prototype.slice = function slice (start, end) {\n const len = this.length\n start = ~~start\n end = end === undefined ? len : ~~end\n\n if (start < 0) {\n start += len\n if (start < 0) start = 0\n } else if (start > len) {\n start = len\n }\n\n if (end < 0) {\n end += len\n if (end < 0) end = 0\n } else if (end > len) {\n end = len\n }\n\n if (end < start) end = start\n\n const newBuf = this.subarray(start, end)\n // Return an augmented `Uint8Array` instance\n Object.setPrototypeOf(newBuf, Buffer.prototype)\n\n return newBuf\n}\n\n/*\n * Need to make sure that buffer isn't trying to write out of bounds.\n */\nfunction checkOffset (offset, ext, length) {\n if ((offset % 1) !== 0 || offset < 0) throw new RangeError('offset is not uint')\n if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length')\n}\n\nBuffer.prototype.readUintLE =\nBuffer.prototype.readUIntLE = function readUIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUintBE =\nBuffer.prototype.readUIntBE = function readUIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n checkOffset(offset, byteLength, this.length)\n }\n\n let val = this[offset + --byteLength]\n let mul = 1\n while (byteLength > 0 && (mul *= 0x100)) {\n val += this[offset + --byteLength] * mul\n }\n\n return val\n}\n\nBuffer.prototype.readUint8 =\nBuffer.prototype.readUInt8 = function readUInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n return this[offset]\n}\n\nBuffer.prototype.readUint16LE =\nBuffer.prototype.readUInt16LE = function readUInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return this[offset] | (this[offset + 1] << 8)\n}\n\nBuffer.prototype.readUint16BE =\nBuffer.prototype.readUInt16BE = function readUInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n return (this[offset] << 8) | this[offset + 1]\n}\n\nBuffer.prototype.readUint32LE =\nBuffer.prototype.readUInt32LE = function readUInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return ((this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16)) +\n (this[offset + 3] * 0x1000000)\n}\n\nBuffer.prototype.readUint32BE =\nBuffer.prototype.readUInt32BE = function readUInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] * 0x1000000) +\n ((this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n this[offset + 3])\n}\n\nBuffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const lo = first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24\n\n const hi = this[++offset] +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n last * 2 ** 24\n\n return BigInt(lo) + (BigInt(hi) << BigInt(32))\n})\n\nBuffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const hi = first * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n const lo = this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last\n\n return (BigInt(hi) << BigInt(32)) + BigInt(lo)\n})\n\nBuffer.prototype.readIntLE = function readIntLE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let val = this[offset]\n let mul = 1\n let i = 0\n while (++i < byteLength && (mul *= 0x100)) {\n val += this[offset + i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readIntBE = function readIntBE (offset, byteLength, noAssert) {\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) checkOffset(offset, byteLength, this.length)\n\n let i = byteLength\n let mul = 1\n let val = this[offset + --i]\n while (i > 0 && (mul *= 0x100)) {\n val += this[offset + --i] * mul\n }\n mul *= 0x80\n\n if (val >= mul) val -= Math.pow(2, 8 * byteLength)\n\n return val\n}\n\nBuffer.prototype.readInt8 = function readInt8 (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 1, this.length)\n if (!(this[offset] & 0x80)) return (this[offset])\n return ((0xff - this[offset] + 1) * -1)\n}\n\nBuffer.prototype.readInt16LE = function readInt16LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset] | (this[offset + 1] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt16BE = function readInt16BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 2, this.length)\n const val = this[offset + 1] | (this[offset] << 8)\n return (val & 0x8000) ? val | 0xFFFF0000 : val\n}\n\nBuffer.prototype.readInt32LE = function readInt32LE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset]) |\n (this[offset + 1] << 8) |\n (this[offset + 2] << 16) |\n (this[offset + 3] << 24)\n}\n\nBuffer.prototype.readInt32BE = function readInt32BE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n\n return (this[offset] << 24) |\n (this[offset + 1] << 16) |\n (this[offset + 2] << 8) |\n (this[offset + 3])\n}\n\nBuffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = this[offset + 4] +\n this[offset + 5] * 2 ** 8 +\n this[offset + 6] * 2 ** 16 +\n (last << 24) // Overflow\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(first +\n this[++offset] * 2 ** 8 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 24)\n})\n\nBuffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE (offset) {\n offset = offset >>> 0\n validateNumber(offset, 'offset')\n const first = this[offset]\n const last = this[offset + 7]\n if (first === undefined || last === undefined) {\n boundsError(offset, this.length - 8)\n }\n\n const val = (first << 24) + // Overflow\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n this[++offset]\n\n return (BigInt(val) << BigInt(32)) +\n BigInt(this[++offset] * 2 ** 24 +\n this[++offset] * 2 ** 16 +\n this[++offset] * 2 ** 8 +\n last)\n})\n\nBuffer.prototype.readFloatLE = function readFloatLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, true, 23, 4)\n}\n\nBuffer.prototype.readFloatBE = function readFloatBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 4, this.length)\n return ieee754.read(this, offset, false, 23, 4)\n}\n\nBuffer.prototype.readDoubleLE = function readDoubleLE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, true, 52, 8)\n}\n\nBuffer.prototype.readDoubleBE = function readDoubleBE (offset, noAssert) {\n offset = offset >>> 0\n if (!noAssert) checkOffset(offset, 8, this.length)\n return ieee754.read(this, offset, false, 52, 8)\n}\n\nfunction checkInt (buf, value, offset, ext, max, min) {\n if (!Buffer.isBuffer(buf)) throw new TypeError('\"buffer\" argument must be a Buffer instance')\n if (value > max || value < min) throw new RangeError('\"value\" argument is out of bounds')\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n}\n\nBuffer.prototype.writeUintLE =\nBuffer.prototype.writeUIntLE = function writeUIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let mul = 1\n let i = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUintBE =\nBuffer.prototype.writeUIntBE = function writeUIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n byteLength = byteLength >>> 0\n if (!noAssert) {\n const maxBytes = Math.pow(2, 8 * byteLength) - 1\n checkInt(this, value, offset, byteLength, maxBytes, 0)\n }\n\n let i = byteLength - 1\n let mul = 1\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n this[offset + i] = (value / mul) & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeUint8 =\nBuffer.prototype.writeUInt8 = function writeUInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0)\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeUint16LE =\nBuffer.prototype.writeUInt16LE = function writeUInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeUint16BE =\nBuffer.prototype.writeUInt16BE = function writeUInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeUint32LE =\nBuffer.prototype.writeUInt32LE = function writeUInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset + 3] = (value >>> 24)\n this[offset + 2] = (value >>> 16)\n this[offset + 1] = (value >>> 8)\n this[offset] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeUint32BE =\nBuffer.prototype.writeUInt32BE = function writeUInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0)\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nfunction wrtBigUInt64LE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n lo = lo >> 8\n buf[offset++] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n hi = hi >> 8\n buf[offset++] = hi\n return offset\n}\n\nfunction wrtBigUInt64BE (buf, value, offset, min, max) {\n checkIntBI(value, min, max, buf, offset, 7)\n\n let lo = Number(value & BigInt(0xffffffff))\n buf[offset + 7] = lo\n lo = lo >> 8\n buf[offset + 6] = lo\n lo = lo >> 8\n buf[offset + 5] = lo\n lo = lo >> 8\n buf[offset + 4] = lo\n let hi = Number(value >> BigInt(32) & BigInt(0xffffffff))\n buf[offset + 3] = hi\n hi = hi >> 8\n buf[offset + 2] = hi\n hi = hi >> 8\n buf[offset + 1] = hi\n hi = hi >> 8\n buf[offset] = hi\n return offset + 8\n}\n\nBuffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff'))\n})\n\nBuffer.prototype.writeIntLE = function writeIntLE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = 0\n let mul = 1\n let sub = 0\n this[offset] = value & 0xFF\n while (++i < byteLength && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeIntBE = function writeIntBE (value, offset, byteLength, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n const limit = Math.pow(2, (8 * byteLength) - 1)\n\n checkInt(this, value, offset, byteLength, limit - 1, -limit)\n }\n\n let i = byteLength - 1\n let mul = 1\n let sub = 0\n this[offset + i] = value & 0xFF\n while (--i >= 0 && (mul *= 0x100)) {\n if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) {\n sub = 1\n }\n this[offset + i] = ((value / mul) >> 0) - sub & 0xFF\n }\n\n return offset + byteLength\n}\n\nBuffer.prototype.writeInt8 = function writeInt8 (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80)\n if (value < 0) value = 0xff + value + 1\n this[offset] = (value & 0xff)\n return offset + 1\n}\n\nBuffer.prototype.writeInt16LE = function writeInt16LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n return offset + 2\n}\n\nBuffer.prototype.writeInt16BE = function writeInt16BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000)\n this[offset] = (value >>> 8)\n this[offset + 1] = (value & 0xff)\n return offset + 2\n}\n\nBuffer.prototype.writeInt32LE = function writeInt32LE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n this[offset] = (value & 0xff)\n this[offset + 1] = (value >>> 8)\n this[offset + 2] = (value >>> 16)\n this[offset + 3] = (value >>> 24)\n return offset + 4\n}\n\nBuffer.prototype.writeInt32BE = function writeInt32BE (value, offset, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000)\n if (value < 0) value = 0xffffffff + value + 1\n this[offset] = (value >>> 24)\n this[offset + 1] = (value >>> 16)\n this[offset + 2] = (value >>> 8)\n this[offset + 3] = (value & 0xff)\n return offset + 4\n}\n\nBuffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE (value, offset = 0) {\n return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nBuffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE (value, offset = 0) {\n return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff'))\n})\n\nfunction checkIEEE754 (buf, value, offset, ext, max, min) {\n if (offset + ext > buf.length) throw new RangeError('Index out of range')\n if (offset < 0) throw new RangeError('Index out of range')\n}\n\nfunction writeFloat (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38)\n }\n ieee754.write(buf, value, offset, littleEndian, 23, 4)\n return offset + 4\n}\n\nBuffer.prototype.writeFloatLE = function writeFloatLE (value, offset, noAssert) {\n return writeFloat(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeFloatBE = function writeFloatBE (value, offset, noAssert) {\n return writeFloat(this, value, offset, false, noAssert)\n}\n\nfunction writeDouble (buf, value, offset, littleEndian, noAssert) {\n value = +value\n offset = offset >>> 0\n if (!noAssert) {\n checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308)\n }\n ieee754.write(buf, value, offset, littleEndian, 52, 8)\n return offset + 8\n}\n\nBuffer.prototype.writeDoubleLE = function writeDoubleLE (value, offset, noAssert) {\n return writeDouble(this, value, offset, true, noAssert)\n}\n\nBuffer.prototype.writeDoubleBE = function writeDoubleBE (value, offset, noAssert) {\n return writeDouble(this, value, offset, false, noAssert)\n}\n\n// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)\nBuffer.prototype.copy = function copy (target, targetStart, start, end) {\n if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer')\n if (!start) start = 0\n if (!end && end !== 0) end = this.length\n if (targetStart >= target.length) targetStart = target.length\n if (!targetStart) targetStart = 0\n if (end > 0 && end < start) end = start\n\n // Copy 0 bytes; we're done\n if (end === start) return 0\n if (target.length === 0 || this.length === 0) return 0\n\n // Fatal error conditions\n if (targetStart < 0) {\n throw new RangeError('targetStart out of bounds')\n }\n if (start < 0 || start >= this.length) throw new RangeError('Index out of range')\n if (end < 0) throw new RangeError('sourceEnd out of bounds')\n\n // Are we oob?\n if (end > this.length) end = this.length\n if (target.length - targetStart < end - start) {\n end = target.length - targetStart + start\n }\n\n const len = end - start\n\n if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') {\n // Use built-in when available, missing from IE11\n this.copyWithin(targetStart, start, end)\n } else {\n Uint8Array.prototype.set.call(\n target,\n this.subarray(start, end),\n targetStart\n )\n }\n\n return len\n}\n\n// Usage:\n// buffer.fill(number[, offset[, end]])\n// buffer.fill(buffer[, offset[, end]])\n// buffer.fill(string[, offset[, end]][, encoding])\nBuffer.prototype.fill = function fill (val, start, end, encoding) {\n // Handle string cases:\n if (typeof val === 'string') {\n if (typeof start === 'string') {\n encoding = start\n start = 0\n end = this.length\n } else if (typeof end === 'string') {\n encoding = end\n end = this.length\n }\n if (encoding !== undefined && typeof encoding !== 'string') {\n throw new TypeError('encoding must be a string')\n }\n if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) {\n throw new TypeError('Unknown encoding: ' + encoding)\n }\n if (val.length === 1) {\n const code = val.charCodeAt(0)\n if ((encoding === 'utf8' && code < 128) ||\n encoding === 'latin1') {\n // Fast path: If `val` fits into a single byte, use that numeric value.\n val = code\n }\n }\n } else if (typeof val === 'number') {\n val = val & 255\n } else if (typeof val === 'boolean') {\n val = Number(val)\n }\n\n // Invalid ranges are not set to a default, so can range check early.\n if (start < 0 || this.length < start || this.length < end) {\n throw new RangeError('Out of range index')\n }\n\n if (end <= start) {\n return this\n }\n\n start = start >>> 0\n end = end === undefined ? this.length : end >>> 0\n\n if (!val) val = 0\n\n let i\n if (typeof val === 'number') {\n for (i = start; i < end; ++i) {\n this[i] = val\n }\n } else {\n const bytes = Buffer.isBuffer(val)\n ? val\n : Buffer.from(val, encoding)\n const len = bytes.length\n if (len === 0) {\n throw new TypeError('The value \"' + val +\n '\" is invalid for argument \"value\"')\n }\n for (i = 0; i < end - start; ++i) {\n this[i + start] = bytes[i % len]\n }\n }\n\n return this\n}\n\n// CUSTOM ERRORS\n// =============\n\n// Simplified versions from Node, changed for Buffer-only usage\nconst errors = {}\nfunction E (sym, getMessage, Base) {\n errors[sym] = class NodeError extends Base {\n constructor () {\n super()\n\n Object.defineProperty(this, 'message', {\n value: getMessage.apply(this, arguments),\n writable: true,\n configurable: true\n })\n\n // Add the error code to the name to include it in the stack trace.\n this.name = `${this.name} [${sym}]`\n // Access the stack to generate the error message including the error code\n // from the name.\n this.stack // eslint-disable-line no-unused-expressions\n // Reset the name to the actual name.\n delete this.name\n }\n\n get code () {\n return sym\n }\n\n set code (value) {\n Object.defineProperty(this, 'code', {\n configurable: true,\n enumerable: true,\n value,\n writable: true\n })\n }\n\n toString () {\n return `${this.name} [${sym}]: ${this.message}`\n }\n }\n}\n\nE('ERR_BUFFER_OUT_OF_BOUNDS',\n function (name) {\n if (name) {\n return `${name} is outside of buffer bounds`\n }\n\n return 'Attempt to access memory outside buffer bounds'\n }, RangeError)\nE('ERR_INVALID_ARG_TYPE',\n function (name, actual) {\n return `The \"${name}\" argument must be of type number. Received type ${typeof actual}`\n }, TypeError)\nE('ERR_OUT_OF_RANGE',\n function (str, range, input) {\n let msg = `The value of \"${str}\" is out of range.`\n let received = input\n if (Number.isInteger(input) && Math.abs(input) > 2 ** 32) {\n received = addNumericalSeparator(String(input))\n } else if (typeof input === 'bigint') {\n received = String(input)\n if (input > BigInt(2) ** BigInt(32) || input < -(BigInt(2) ** BigInt(32))) {\n received = addNumericalSeparator(received)\n }\n received += 'n'\n }\n msg += ` It must be ${range}. Received ${received}`\n return msg\n }, RangeError)\n\nfunction addNumericalSeparator (val) {\n let res = ''\n let i = val.length\n const start = val[0] === '-' ? 1 : 0\n for (; i >= start + 4; i -= 3) {\n res = `_${val.slice(i - 3, i)}${res}`\n }\n return `${val.slice(0, i)}${res}`\n}\n\n// CHECK FUNCTIONS\n// ===============\n\nfunction checkBounds (buf, offset, byteLength) {\n validateNumber(offset, 'offset')\n if (buf[offset] === undefined || buf[offset + byteLength] === undefined) {\n boundsError(offset, buf.length - (byteLength + 1))\n }\n}\n\nfunction checkIntBI (value, min, max, buf, offset, byteLength) {\n if (value > max || value < min) {\n const n = typeof min === 'bigint' ? 'n' : ''\n let range\n if (byteLength > 3) {\n if (min === 0 || min === BigInt(0)) {\n range = `>= 0${n} and < 2${n} ** ${(byteLength + 1) * 8}${n}`\n } else {\n range = `>= -(2${n} ** ${(byteLength + 1) * 8 - 1}${n}) and < 2 ** ` +\n `${(byteLength + 1) * 8 - 1}${n}`\n }\n } else {\n range = `>= ${min}${n} and <= ${max}${n}`\n }\n throw new errors.ERR_OUT_OF_RANGE('value', range, value)\n }\n checkBounds(buf, offset, byteLength)\n}\n\nfunction validateNumber (value, name) {\n if (typeof value !== 'number') {\n throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value)\n }\n}\n\nfunction boundsError (value, length, type) {\n if (Math.floor(value) !== value) {\n validateNumber(value, type)\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value)\n }\n\n if (length < 0) {\n throw new errors.ERR_BUFFER_OUT_OF_BOUNDS()\n }\n\n throw new errors.ERR_OUT_OF_RANGE(type || 'offset',\n `>= ${type ? 1 : 0} and <= ${length}`,\n value)\n}\n\n// HELPER FUNCTIONS\n// ================\n\nconst INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g\n\nfunction base64clean (str) {\n // Node takes equal signs as end of the Base64 encoding\n str = str.split('=')[0]\n // Node strips out invalid characters like \\n and \\t from the string, base64-js does not\n str = str.trim().replace(INVALID_BASE64_RE, '')\n // Node converts strings with length < 2 to ''\n if (str.length < 2) return ''\n // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not\n while (str.length % 4 !== 0) {\n str = str + '='\n }\n return str\n}\n\nfunction utf8ToBytes (string, units) {\n units = units || Infinity\n let codePoint\n const length = string.length\n let leadSurrogate = null\n const bytes = []\n\n for (let i = 0; i < length; ++i) {\n codePoint = string.charCodeAt(i)\n\n // is surrogate component\n if (codePoint > 0xD7FF && codePoint < 0xE000) {\n // last char was a lead\n if (!leadSurrogate) {\n // no lead yet\n if (codePoint > 0xDBFF) {\n // unexpected trail\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n } else if (i + 1 === length) {\n // unpaired lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n continue\n }\n\n // valid lead\n leadSurrogate = codePoint\n\n continue\n }\n\n // 2 leads in a row\n if (codePoint < 0xDC00) {\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n leadSurrogate = codePoint\n continue\n }\n\n // valid surrogate pair\n codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000\n } else if (leadSurrogate) {\n // valid bmp char, but last char was a lead\n if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD)\n }\n\n leadSurrogate = null\n\n // encode utf8\n if (codePoint < 0x80) {\n if ((units -= 1) < 0) break\n bytes.push(codePoint)\n } else if (codePoint < 0x800) {\n if ((units -= 2) < 0) break\n bytes.push(\n codePoint >> 0x6 | 0xC0,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x10000) {\n if ((units -= 3) < 0) break\n bytes.push(\n codePoint >> 0xC | 0xE0,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else if (codePoint < 0x110000) {\n if ((units -= 4) < 0) break\n bytes.push(\n codePoint >> 0x12 | 0xF0,\n codePoint >> 0xC & 0x3F | 0x80,\n codePoint >> 0x6 & 0x3F | 0x80,\n codePoint & 0x3F | 0x80\n )\n } else {\n throw new Error('Invalid code point')\n }\n }\n\n return bytes\n}\n\nfunction asciiToBytes (str) {\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n // Node's code seems to be doing this and not & 0x7F..\n byteArray.push(str.charCodeAt(i) & 0xFF)\n }\n return byteArray\n}\n\nfunction utf16leToBytes (str, units) {\n let c, hi, lo\n const byteArray = []\n for (let i = 0; i < str.length; ++i) {\n if ((units -= 2) < 0) break\n\n c = str.charCodeAt(i)\n hi = c >> 8\n lo = c % 256\n byteArray.push(lo)\n byteArray.push(hi)\n }\n\n return byteArray\n}\n\nfunction base64ToBytes (str) {\n return base64.toByteArray(base64clean(str))\n}\n\nfunction blitBuffer (src, dst, offset, length) {\n let i\n for (i = 0; i < length; ++i) {\n if ((i + offset >= dst.length) || (i >= src.length)) break\n dst[i + offset] = src[i]\n }\n return i\n}\n\n// ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass\n// the `instanceof` check but they should be treated as of that type.\n// See: https://github.com/feross/buffer/issues/166\nfunction isInstance (obj, type) {\n return obj instanceof type ||\n (obj != null && obj.constructor != null && obj.constructor.name != null &&\n obj.constructor.name === type.name)\n}\nfunction numberIsNaN (obj) {\n // For IE11 support\n return obj !== obj // eslint-disable-line no-self-compare\n}\n\n// Create lookup table for `toString('hex')`\n// See: https://github.com/feross/buffer/issues/219\nconst hexSliceLookupTable = (function () {\n const alphabet = '0123456789abcdef'\n const table = new Array(256)\n for (let i = 0; i < 16; ++i) {\n const i16 = i * 16\n for (let j = 0; j < 16; ++j) {\n table[i16 + j] = alphabet[i] + alphabet[j]\n }\n }\n return table\n})()\n\n// Return not function with Error if BigInt not supported\nfunction defineBigIntMethod (fn) {\n return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn\n}\n\nfunction BufferBigIntNotDefined () {\n throw new Error('BigInt not supported')\n}\n","function anumber(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error('positive integer expected, got ' + n);\n}\n// copied from utils\nfunction isBytes(a) {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\nfunction abytes(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 + ', got length=' + b.length);\n}\nfunction ahash(h) {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n anumber(h.outputLen);\n anumber(h.blockLen);\n}\nfunction aexists(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 aoutput(out, instance) {\n abytes(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 { anumber, anumber as number, abytes, abytes as bytes, ahash, aexists, aoutput };\nconst assert = {\n number: anumber,\n bytes: abytes,\n hash: ahash,\n exists: aexists,\n output: aoutput,\n};\nexport default assert;\n//# sourceMappingURL=_assert.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 { 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 || (ArrayBuffer.isView(a) && 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 = /* @__PURE__ */ (() => 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(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10); // 'b' => 98-(97-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; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163\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}\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && {}.toString.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 // Legacy Node.js compatibility\n if (crypto && typeof crypto.randomBytes === 'function') {\n return crypto.randomBytes(bytesLength);\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import { aexists, aoutput } from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n/**\n * Polyfill for Safari 14\n */\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/**\n * Choice: a ? b : c\n */\nexport const Chi = (a, b, c) => (a & b) ^ (~a & c);\n/**\n * Majority function, true if any two inputs is true\n */\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 aexists(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 aexists(this);\n aoutput(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// BigUint64Array is too slow as per 2024, so we implement it using Uint32Array.\n// TODO: re-check https://issues.chromium.org/issues/42212588\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 } 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}\nexport class 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}\nexport class 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}\nexport class 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// 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 || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\nexport function abytes(item) {\n if (!isBytes(item))\n throw new Error('Uint8Array expected');\n}\nexport function abool(title, value) {\n if (typeof value !== 'boolean')\n throw new Error(title + ' boolean expected, got ' + value);\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 return hex === '' ? _0n : BigInt('0x' + hex); // Big Endian\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(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10); // 'b' => 98-(97-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('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; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163\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 hex string or Uint8Array, 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 + ' of length ' + expectedLength + ' expected, 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('string expected');\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n// Is positive bigint\nconst isPosBig = (n) => typeof n === 'bigint' && _0n <= n;\nexport function inRange(n, min, max) {\n return isPosBig(n) && isPosBig(min) && isPosBig(max) && min <= n && n < max;\n}\n/**\n * Asserts min <= n < max. NOTE: It's < max and not <= max.\n * @example\n * aInRange('x', x, 1n, 256n); // would assume x is in (1n..255n)\n */\nexport function aInRange(title, n, min, max) {\n // Why min <= n < max and not a (min < n < max) OR b (min <= n <= max)?\n // consider P=256n, min=0n, max=P\n // - a for min=0 would require -1: `inRange('x', x, -1n, P)`\n // - b would commonly require subtraction: `inRange('x', x, 0n, P - 1n)`\n // - our way is the cleanest: `inRange('x', x, 0n, P)\n if (!inRange(n, min, max))\n throw new Error('expected valid ' + title + ': ' + min + ' <= n < ' + max + ', got ' + n);\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 function');\n const val = object[fieldName];\n if (isOptional && val === undefined)\n return;\n if (!checkVal(val, object)) {\n throw new Error('param ' + String(fieldName) + ' is invalid. Expected ' + type + ', got ' + val);\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/**\n * throws not implemented error\n */\nexport const notImplemented = () => {\n throw new Error('not implemented');\n};\n/**\n * Memoizes (caches) computation result.\n * Uses WeakMap: the value is going auto-cleaned by GC after last reference is removed.\n */\nexport function memoized(fn) {\n const map = new WeakMap();\n return (arg, ...args) => {\n const val = map.get(arg);\n if (val !== undefined)\n return val;\n const computed = fn(arg, ...args);\n map.set(arg, computed);\n return computed;\n };\n}\n//# sourceMappingURL=utils.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 = /* @__PURE__ */ BigInt(2), _3n = /* @__PURE__ */ BigInt(3);\n// prettier-ignore\nconst _4n = /* @__PURE__ */ BigInt(4), _5n = /* @__PURE__ */ BigInt(5), _8n = /* @__PURE__ */ BigInt(8);\n// prettier-ignore\nconst _9n = /* @__PURE__ */ BigInt(9), _16n = /* @__PURE__ */ 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 (power < _0n)\n throw new Error('invalid exponent, negatives unsupported');\n if (modulo <= _0n)\n throw new Error('invalid modulus');\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)\n throw new Error('invert: expected non-zero number');\n if (modulo <= _0n)\n throw new Error('invert: expected positive modulus, got ' + modulo);\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 // Crash instead of infinity loop, we cannot reasonable count until P.\n if (Z > 1000)\n throw new Error('Cannot find square root: likely non-prime P');\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('invalid exponent, negatives unsupported');\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}\nexport function FpLegendre(order) {\n // (a | p) ≡ 1 if a is a square (mod p), quadratic residue\n // (a | p) ≡ -1 if a is not a square (mod p), quadratic non residue\n // (a | p) ≡ 0 if a ≡ 0 (mod p)\n const legendreConst = (order - _1n) / _2n; // Integer arithmetic\n return (f, x) => f.pow(x, legendreConst);\n}\n// This function returns True whenever the value x is a square in the field F.\nexport function FpIsSquare(f) {\n const legendre = FpLegendre(f.ORDER);\n return (x) => {\n const p = legendre(f, x);\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 * NOTE: operations don't check 'isValid' for all elements for performance reasons,\n * it is caller responsibility to check this.\n * This is low-level code, please make sure you know what you doing.\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('invalid field: expected ORDER > 0, got ' + ORDER);\n const { nBitLength: BITS, nByteLength: BYTES } = nLength(ORDER, bitLen);\n if (BYTES > 2048)\n throw new Error('invalid field: expected ORDER of <= 2048 bytes');\n let sqrtP; // cached sqrtP\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 ((n) => {\n if (!sqrtP)\n sqrtP = FpSqrt(ORDER);\n return sqrtP(f, n);\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('Field.fromBytes: expected ' + BYTES + ' 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// Abelian group utilities\nimport { validateField, nLength } from './modular.js';\nimport { validateObject, bitLen } from './utils.js';\nconst _0n = BigInt(0);\nconst _1n = BigInt(1);\nfunction constTimeNegate(condition, item) {\n const neg = item.negate();\n return condition ? neg : item;\n}\nfunction validateW(W, bits) {\n if (!Number.isSafeInteger(W) || W <= 0 || W > bits)\n throw new Error('invalid window size, expected [1..' + bits + '], got W=' + W);\n}\nfunction calcWOpts(W, bits) {\n validateW(W, bits);\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}\nfunction validateMSMPoints(points, c) {\n if (!Array.isArray(points))\n throw new Error('array expected');\n points.forEach((p, i) => {\n if (!(p instanceof c))\n throw new Error('invalid point at index ' + i);\n });\n}\nfunction validateMSMScalars(scalars, field) {\n if (!Array.isArray(scalars))\n throw new Error('array of scalars expected');\n scalars.forEach((s, i) => {\n if (!field.isValid(s))\n throw new Error('invalid scalar at index ' + i);\n });\n}\n// Since points in different groups cannot be equal (different object constructor),\n// we can have single place to store precomputes\nconst pointPrecomputes = new WeakMap();\nconst pointWindowSizes = new WeakMap(); // This allows use make points immutable (nothing changes inside)\nfunction getW(P) {\n return pointWindowSizes.get(P) || 1;\n}\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 return {\n constTimeNegate,\n hasPrecomputes(elm) {\n return getW(elm) !== 1;\n },\n // non-const time multiplication ladder\n unsafeLadder(elm, n, 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 * @param elm Point instance\n * @param W window size\n * @returns precomputed point tables flattened to a single array\n */\n precomputeWindow(elm, W) {\n const { windows, windowSize } = calcWOpts(W, bits);\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 } = calcWOpts(W, bits);\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 /**\n * Implements ec unsafe (non const-time) 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 * @param acc accumulator point to add result of multiplication\n * @returns point\n */\n wNAFUnsafe(W, precomputes, n, acc = c.ZERO) {\n const { windows, windowSize } = calcWOpts(W, bits);\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 if (n === _0n)\n break; // No need to go over empty scalar\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 if (wbits === 0)\n continue;\n let curr = precomputes[offset + Math.abs(wbits) - 1]; // -1 because we skip zero\n if (wbits < 0)\n curr = curr.negate();\n // NOTE: by re-using acc, we can save a lot of additions in case of MSM\n acc = acc.add(curr);\n }\n return acc;\n },\n getPrecomputes(W, P, transform) {\n // Calculate precomputes on a first run, reuse them after\n let comp = pointPrecomputes.get(P);\n if (!comp) {\n comp = this.precomputeWindow(P, W);\n if (W !== 1)\n pointPrecomputes.set(P, transform(comp));\n }\n return comp;\n },\n wNAFCached(P, n, transform) {\n const W = getW(P);\n return this.wNAF(W, this.getPrecomputes(W, P, transform), n);\n },\n wNAFCachedUnsafe(P, n, transform, prev) {\n const W = getW(P);\n if (W === 1)\n return this.unsafeLadder(P, n, prev); // For W=1 ladder is ~x2 faster\n return this.wNAFUnsafe(W, this.getPrecomputes(W, P, transform), n, prev);\n },\n // We calculate precomputes for elliptic curve point multiplication\n // using windowed method. This specifies window size and\n // stores precomputed values. Usually only base point would be precomputed.\n setWindowSize(P, W) {\n validateW(W, bits);\n pointWindowSizes.set(P, W);\n pointPrecomputes.delete(P);\n },\n };\n}\n/**\n * Pippenger algorithm for multi-scalar multiplication (MSM, Pa + Qb + Rc + ...).\n * 30x faster vs naive addition on L=4096, 10x faster with precomputes.\n * For N=254bit, L=1, it does: 1024 ADD + 254 DBL. For L=5: 1536 ADD + 254 DBL.\n * Algorithmically constant-time (for same L), even when 1 point + scalar, or when scalar = 0.\n * @param c Curve Point constructor\n * @param fieldN field over CURVE.N - important that it's not over CURVE.P\n * @param points array of L curve points\n * @param scalars array of L scalars (aka private keys / bigints)\n */\nexport function pippenger(c, fieldN, points, scalars) {\n // If we split scalars by some window (let's say 8 bits), every chunk will only\n // take 256 buckets even if there are 4096 scalars, also re-uses double.\n // TODO:\n // - https://eprint.iacr.org/2024/750.pdf\n // - https://tches.iacr.org/index.php/TCHES/article/view/10287\n // 0 is accepted in scalars\n validateMSMPoints(points, c);\n validateMSMScalars(scalars, fieldN);\n if (points.length !== scalars.length)\n throw new Error('arrays of points and scalars must have equal length');\n const zero = c.ZERO;\n const wbits = bitLen(BigInt(points.length));\n const windowSize = wbits > 12 ? wbits - 3 : wbits > 4 ? wbits - 2 : wbits ? 2 : 1; // in bits\n const MASK = (1 << windowSize) - 1;\n const buckets = new Array(MASK + 1).fill(zero); // +1 for zero array\n const lastBits = Math.floor((fieldN.BITS - 1) / windowSize) * windowSize;\n let sum = zero;\n for (let i = lastBits; i >= 0; i -= windowSize) {\n buckets.fill(zero);\n for (let j = 0; j < scalars.length; j++) {\n const scalar = scalars[j];\n const wbits = Number((scalar >> BigInt(i)) & BigInt(MASK));\n buckets[wbits] = buckets[wbits].add(points[j]);\n }\n let resI = zero; // not using this will do small speed-up, but will lose ct\n // Skip first bucket, because it is zero\n for (let j = buckets.length - 1, sumI = zero; j > 0; j--) {\n sumI = sumI.add(buckets[j]);\n resI = resI.add(sumI);\n }\n sum = sum.add(resI);\n if (i !== 0)\n for (let j = 0; j < windowSize; j++)\n sum = sum.double();\n }\n return sum;\n}\n/**\n * Precomputed multi-scalar multiplication (MSM, Pa + Qb + Rc + ...).\n * @param c Curve Point constructor\n * @param fieldN field over CURVE.N - important that it's not over CURVE.P\n * @param points array of L curve points\n * @returns function which multiplies points with scaars\n */\nexport function precomputeMSMUnsafe(c, fieldN, points, windowSize) {\n /**\n * Performance Analysis of Window-based Precomputation\n *\n * Base Case (256-bit scalar, 8-bit window):\n * - Standard precomputation requires:\n * - 31 additions per scalar × 256 scalars = 7,936 ops\n * - Plus 255 summary additions = 8,191 total ops\n * Note: Summary additions can be optimized via accumulator\n *\n * Chunked Precomputation Analysis:\n * - Using 32 chunks requires:\n * - 255 additions per chunk\n * - 256 doublings\n * - Total: (255 × 32) + 256 = 8,416 ops\n *\n * Memory Usage Comparison:\n * Window Size | Standard Points | Chunked Points\n * ------------|-----------------|---------------\n * 4-bit | 520 | 15\n * 8-bit | 4,224 | 255\n * 10-bit | 13,824 | 1,023\n * 16-bit | 557,056 | 65,535\n *\n * Key Advantages:\n * 1. Enables larger window sizes due to reduced memory overhead\n * 2. More efficient for smaller scalar counts:\n * - 16 chunks: (16 × 255) + 256 = 4,336 ops\n * - ~2x faster than standard 8,191 ops\n *\n * Limitations:\n * - Not suitable for plain precomputes (requires 256 constant doublings)\n * - Performance degrades with larger scalar counts:\n * - Optimal for ~256 scalars\n * - Less efficient for 4096+ scalars (Pippenger preferred)\n */\n validateW(windowSize, fieldN.BITS);\n validateMSMPoints(points, c);\n const zero = c.ZERO;\n const tableSize = 2 ** windowSize - 1; // table size (without zero)\n const chunks = Math.ceil(fieldN.BITS / windowSize); // chunks of item\n const MASK = BigInt((1 << windowSize) - 1);\n const tables = points.map((p) => {\n const res = [];\n for (let i = 0, acc = p; i < tableSize; i++) {\n res.push(acc);\n acc = acc.add(p);\n }\n return res;\n });\n return (scalars) => {\n validateMSMScalars(scalars, fieldN);\n if (scalars.length > points.length)\n throw new Error('array of scalars must be smaller than array of points');\n let res = zero;\n for (let i = 0; i < chunks; i++) {\n // No need to double if accumulator is still zero.\n if (res !== zero)\n for (let j = 0; j < windowSize; j++)\n res = res.double();\n const shiftBy = BigInt(chunks * windowSize - (i + 1) * windowSize);\n for (let j = 0; j < scalars.length; j++) {\n const n = scalars[j];\n const curr = Number((n >> shiftBy) & MASK);\n if (!curr)\n continue; // skip zero scalars chunks\n res = res.add(tables[j][curr - 1]);\n }\n }\n return res;\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// Twisted Edwards curve. The formula is: ax² + y² = 1 + dx²y²\nimport { validateBasic, wNAF, pippenger, } from './curve.js';\nimport { mod, Field } from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes, memoized, abool } 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/**\n * Creates Twisted Edwards curve with EdDSA signatures.\n * @example\n * import { Field } from '@noble/curves/abstract/modular';\n * // Before that, define BigInt-s: a, d, p, n, Gx, Gy, h\n * const curve = twistedEdwards({ a, d, Fp: Field(p), n, Gx, Gy, h })\n */\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 // Important:\n // There are some places where Fp.BYTES is used instead of nByteLength.\n // So far, everything has been tested with curves of Fp.BYTES == nByteLength.\n // TODO: test and find curves which behave otherwise.\n const MASK = _2n << (BigInt(nByteLength * 8) - _1n);\n const modP = Fp.create; // Function overrides\n const Fn = Field(CURVE.n, CURVE.nBitLength);\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 abool('phflag', phflag);\n if (ctx.length || phflag)\n throw new Error('Contexts/pre-hash are not supported');\n return data;\n }); // NOOP\n // 0 <= n < MASK\n // Coordinates larger than Fp.ORDER are allowed for zip215\n function aCoordinate(title, n) {\n ut.aInRange('coordinate ' + title, n, _0n, MASK);\n }\n function assertPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ExtendedPoint expected');\n }\n // Converts Extended point to default (x, y) coordinates.\n // Can accept precomputed Z^-1 - for example, from invertBatch.\n const toAffineMemo = memoized((p, iz) => {\n const { ex: x, ey: y, ez: z } = p;\n const is0 = p.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 const assertValidMemo = memoized((p) => {\n const { a, d } = CURVE;\n if (p.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 } = p;\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 return true;\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 aCoordinate('x', ex);\n aCoordinate('y', ey);\n aCoordinate('z', ez);\n aCoordinate('t', et);\n Object.freeze(this);\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 aCoordinate('x', x);\n aCoordinate('y', y);\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 // Multiscalar Multiplication\n static msm(points, scalars) {\n return pippenger(Point, Fn, points, scalars);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n wnaf.setWindowSize(this, windowSize);\n }\n // Not required for fromHex(), which always creates valid points.\n // Could be useful for fromAffine().\n assertValidity() {\n assertValidMemo(this);\n }\n // Compare one point to another.\n equals(other) {\n assertPoint(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 assertPoint(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, n, Point.normalizeZ);\n }\n // Constant-time multiplication.\n multiply(scalar) {\n const n = scalar;\n ut.aInRange('scalar', n, _1n, CURVE_ORDER); // 1 <= scalar < L\n const { p, f } = this.wNAF(n);\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 // Accepts optional accumulator to merge with multiply (important for sparse scalars)\n multiplyUnsafe(scalar, acc = Point.ZERO) {\n const n = scalar;\n ut.aInRange('scalar', n, _0n, CURVE_ORDER); // 0 <= scalar < L\n if (n === _0n)\n return I;\n if (this.is0() || n === _1n)\n return this;\n return wnaf.wNAFCachedUnsafe(this, n, Point.normalizeZ, acc);\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 return toAffineMemo(this, iz);\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 abool('zip215', zip215);\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 // zip215=true is good for consensus-critical apps. =false follows RFC8032 / NIST186-5.\n // RFC8032 prohibits >= p, but ZIP215 doesn't\n // zip215=true: 0 <= y < MASK (2^256 for ed25519)\n // zip215=false: 0 <= y < P (2^255-19 for ed25519)\n const max = zip215 ? MASK : Fp.ORDER;\n ut.aInRange('pointHex.y', y, _0n, max);\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 = Fp.BYTES;\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 ut.aInRange('signature.s', s, _0n, CURVE_ORDER); // 0 <= s < l\n const res = ut.concatBytes(R, ut.numberToBytesLE(s, Fp.BYTES));\n return ensureBytes('result', res, Fp.BYTES * 2); // 64-byte signature\n }\n const verifyOpts = VERIFY_DEFAULT;\n /**\n * Verifies EdDSA signature against message and public key. RFC8032 5.1.7.\n * An extended group equation is checked.\n */\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 publicKey = ensureBytes('publicKey', publicKey, len);\n if (zip215 !== undefined)\n abool('zip215', zip215);\n if (prehash)\n msg = prehash(msg); // for ed25519ph, etc\n const s = ut.bytesToNumberLE(sig.slice(len, 2 * len));\n let A, R, SB;\n try {\n // zip215=true is good for consensus-critical apps. =false follows RFC8032 / NIST186-5.\n // zip215=true: 0 <= y < MASK (2^256 for ed25519)\n // zip215=false: 0 <= y < P (2^255-19 for ed25519)\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 // Extended group equation\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}))();\n/**\n * ed25519 curve with EdDSA signatures.\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 {ed25519} from '@noble/curves/ed25519';\n\n/**\n * A 64 byte secret key, the first 32 bytes of which is the\n * private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\ntype Ed25519SecretKey = Uint8Array;\n\n/**\n * Ed25519 Keypair\n */\nexport interface Ed25519Keypair {\n publicKey: Uint8Array;\n secretKey: Ed25519SecretKey;\n}\n\nexport const generatePrivateKey = ed25519.utils.randomPrivateKey;\nexport const generateKeypair = (): Ed25519Keypair => {\n const privateScalar = ed25519.utils.randomPrivateKey();\n const publicKey = getPublicKey(privateScalar);\n const secretKey = new Uint8Array(64);\n secretKey.set(privateScalar);\n secretKey.set(publicKey, 32);\n return {\n publicKey,\n secretKey,\n };\n};\nexport const getPublicKey = ed25519.getPublicKey;\nexport function isOnCurve(publicKey: Uint8Array): boolean {\n try {\n ed25519.ExtendedPoint.fromHex(publicKey);\n return true;\n } catch {\n return false;\n }\n}\nexport const sign = (\n message: Parameters[0],\n secretKey: Ed25519SecretKey,\n) => ed25519.sign(message, secretKey.slice(0, 32));\nexport const verify = ed25519.verify;\n","import {Buffer} from 'buffer';\n\nexport const toBuffer = (arr: Buffer | Uint8Array | Array): Buffer => {\n if (Buffer.isBuffer(arr)) {\n return arr;\n } else if (arr instanceof Uint8Array) {\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength);\n } else {\n return Buffer.from(arr);\n }\n};\n","(function (module, exports) {\n 'use strict';\n\n // Utils\n function assert (val, msg) {\n if (!val) throw new Error(msg || 'Assertion failed');\n }\n\n // Could use `inherits` module, but don't want to move from single file\n // architecture yet.\n function inherits (ctor, superCtor) {\n ctor.super_ = superCtor;\n var TempCtor = function () {};\n TempCtor.prototype = superCtor.prototype;\n ctor.prototype = new TempCtor();\n ctor.prototype.constructor = ctor;\n }\n\n // BN\n\n function BN (number, base, endian) {\n if (BN.isBN(number)) {\n return number;\n }\n\n this.negative = 0;\n this.words = null;\n this.length = 0;\n\n // Reduction context\n this.red = null;\n\n if (number !== null) {\n if (base === 'le' || base === 'be') {\n endian = base;\n base = 10;\n }\n\n this._init(number || 0, base || 10, endian || 'be');\n }\n }\n if (typeof module === 'object') {\n module.exports = BN;\n } else {\n exports.BN = BN;\n }\n\n BN.BN = BN;\n BN.wordSize = 26;\n\n var Buffer;\n try {\n if (typeof window !== 'undefined' && typeof window.Buffer !== 'undefined') {\n Buffer = window.Buffer;\n } else {\n Buffer = require('buffer').Buffer;\n }\n } catch (e) {\n }\n\n BN.isBN = function isBN (num) {\n if (num instanceof BN) {\n return true;\n }\n\n return num !== null && typeof num === 'object' &&\n num.constructor.wordSize === BN.wordSize && Array.isArray(num.words);\n };\n\n BN.max = function max (left, right) {\n if (left.cmp(right) > 0) return left;\n return right;\n };\n\n BN.min = function min (left, right) {\n if (left.cmp(right) < 0) return left;\n return right;\n };\n\n BN.prototype._init = function init (number, base, endian) {\n if (typeof number === 'number') {\n return this._initNumber(number, base, endian);\n }\n\n if (typeof number === 'object') {\n return this._initArray(number, base, endian);\n }\n\n if (base === 'hex') {\n base = 16;\n }\n assert(base === (base | 0) && base >= 2 && base <= 36);\n\n number = number.toString().replace(/\\s+/g, '');\n var start = 0;\n if (number[0] === '-') {\n start++;\n this.negative = 1;\n }\n\n if (start < number.length) {\n if (base === 16) {\n this._parseHex(number, start, endian);\n } else {\n this._parseBase(number, base, start);\n if (endian === 'le') {\n this._initArray(this.toArray(), base, endian);\n }\n }\n }\n };\n\n BN.prototype._initNumber = function _initNumber (number, base, endian) {\n if (number < 0) {\n this.negative = 1;\n number = -number;\n }\n if (number < 0x4000000) {\n this.words = [number & 0x3ffffff];\n this.length = 1;\n } else if (number < 0x10000000000000) {\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff\n ];\n this.length = 2;\n } else {\n assert(number < 0x20000000000000); // 2 ^ 53 (unsafe)\n this.words = [\n number & 0x3ffffff,\n (number / 0x4000000) & 0x3ffffff,\n 1\n ];\n this.length = 3;\n }\n\n if (endian !== 'le') return;\n\n // Reverse the bytes\n this._initArray(this.toArray(), base, endian);\n };\n\n BN.prototype._initArray = function _initArray (number, base, endian) {\n // Perhaps a Uint8Array\n assert(typeof number.length === 'number');\n if (number.length <= 0) {\n this.words = [0];\n this.length = 1;\n return this;\n }\n\n this.length = Math.ceil(number.length / 3);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n var j, w;\n var off = 0;\n if (endian === 'be') {\n for (i = number.length - 1, j = 0; i >= 0; i -= 3) {\n w = number[i] | (number[i - 1] << 8) | (number[i - 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n } else if (endian === 'le') {\n for (i = 0, j = 0; i < number.length; i += 3) {\n w = number[i] | (number[i + 1] << 8) | (number[i + 2] << 16);\n this.words[j] |= (w << off) & 0x3ffffff;\n this.words[j + 1] = (w >>> (26 - off)) & 0x3ffffff;\n off += 24;\n if (off >= 26) {\n off -= 26;\n j++;\n }\n }\n }\n return this._strip();\n };\n\n function parseHex4Bits (string, index) {\n var c = string.charCodeAt(index);\n // '0' - '9'\n if (c >= 48 && c <= 57) {\n return c - 48;\n // 'A' - 'F'\n } else if (c >= 65 && c <= 70) {\n return c - 55;\n // 'a' - 'f'\n } else if (c >= 97 && c <= 102) {\n return c - 87;\n } else {\n assert(false, 'Invalid character in ' + string);\n }\n }\n\n function parseHexByte (string, lowerBound, index) {\n var r = parseHex4Bits(string, index);\n if (index - 1 >= lowerBound) {\n r |= parseHex4Bits(string, index - 1) << 4;\n }\n return r;\n }\n\n BN.prototype._parseHex = function _parseHex (number, start, endian) {\n // Create possibly bigger array to ensure that it fits the number\n this.length = Math.ceil((number.length - start) / 6);\n this.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n this.words[i] = 0;\n }\n\n // 24-bits chunks\n var off = 0;\n var j = 0;\n\n var w;\n if (endian === 'be') {\n for (i = number.length - 1; i >= start; i -= 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n } else {\n var parseLength = number.length - start;\n for (i = parseLength % 2 === 0 ? start + 1 : start; i < number.length; i += 2) {\n w = parseHexByte(number, start, i) << off;\n this.words[j] |= w & 0x3ffffff;\n if (off >= 18) {\n off -= 18;\n j += 1;\n this.words[j] |= w >>> 26;\n } else {\n off += 8;\n }\n }\n }\n\n this._strip();\n };\n\n function parseBase (str, start, end, mul) {\n var r = 0;\n var b = 0;\n var len = Math.min(str.length, end);\n for (var i = start; i < len; i++) {\n var c = str.charCodeAt(i) - 48;\n\n r *= mul;\n\n // 'a'\n if (c >= 49) {\n b = c - 49 + 0xa;\n\n // 'A'\n } else if (c >= 17) {\n b = c - 17 + 0xa;\n\n // '0' - '9'\n } else {\n b = c;\n }\n assert(c >= 0 && b < mul, 'Invalid character');\n r += b;\n }\n return r;\n }\n\n BN.prototype._parseBase = function _parseBase (number, base, start) {\n // Initialize as zero\n this.words = [0];\n this.length = 1;\n\n // Find length of limb in base\n for (var limbLen = 0, limbPow = 1; limbPow <= 0x3ffffff; limbPow *= base) {\n limbLen++;\n }\n limbLen--;\n limbPow = (limbPow / base) | 0;\n\n var total = number.length - start;\n var mod = total % limbLen;\n var end = Math.min(total, total - mod) + start;\n\n var word = 0;\n for (var i = start; i < end; i += limbLen) {\n word = parseBase(number, i, i + limbLen, base);\n\n this.imuln(limbPow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n if (mod !== 0) {\n var pow = 1;\n word = parseBase(number, i, number.length, base);\n\n for (i = 0; i < mod; i++) {\n pow *= base;\n }\n\n this.imuln(pow);\n if (this.words[0] + word < 0x4000000) {\n this.words[0] += word;\n } else {\n this._iaddn(word);\n }\n }\n\n this._strip();\n };\n\n BN.prototype.copy = function copy (dest) {\n dest.words = new Array(this.length);\n for (var i = 0; i < this.length; i++) {\n dest.words[i] = this.words[i];\n }\n dest.length = this.length;\n dest.negative = this.negative;\n dest.red = this.red;\n };\n\n function move (dest, src) {\n dest.words = src.words;\n dest.length = src.length;\n dest.negative = src.negative;\n dest.red = src.red;\n }\n\n BN.prototype._move = function _move (dest) {\n move(dest, this);\n };\n\n BN.prototype.clone = function clone () {\n var r = new BN(null);\n this.copy(r);\n return r;\n };\n\n BN.prototype._expand = function _expand (size) {\n while (this.length < size) {\n this.words[this.length++] = 0;\n }\n return this;\n };\n\n // Remove leading `0` from `this`\n BN.prototype._strip = function strip () {\n while (this.length > 1 && this.words[this.length - 1] === 0) {\n this.length--;\n }\n return this._normSign();\n };\n\n BN.prototype._normSign = function _normSign () {\n // -0 = 0\n if (this.length === 1 && this.words[0] === 0) {\n this.negative = 0;\n }\n return this;\n };\n\n // Check Symbol.for because not everywhere where Symbol defined\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#Browser_compatibility\n if (typeof Symbol !== 'undefined' && typeof Symbol.for === 'function') {\n try {\n BN.prototype[Symbol.for('nodejs.util.inspect.custom')] = inspect;\n } catch (e) {\n BN.prototype.inspect = inspect;\n }\n } else {\n BN.prototype.inspect = inspect;\n }\n\n function inspect () {\n return (this.red ? '';\n }\n\n /*\n\n var zeros = [];\n var groupSizes = [];\n var groupBases = [];\n\n var s = '';\n var i = -1;\n while (++i < BN.wordSize) {\n zeros[i] = s;\n s += '0';\n }\n groupSizes[0] = 0;\n groupSizes[1] = 0;\n groupBases[0] = 0;\n groupBases[1] = 0;\n var base = 2 - 1;\n while (++base < 36 + 1) {\n var groupSize = 0;\n var groupBase = 1;\n while (groupBase < (1 << BN.wordSize) / base) {\n groupBase *= base;\n groupSize += 1;\n }\n groupSizes[base] = groupSize;\n groupBases[base] = groupBase;\n }\n\n */\n\n var zeros = [\n '',\n '0',\n '00',\n '000',\n '0000',\n '00000',\n '000000',\n '0000000',\n '00000000',\n '000000000',\n '0000000000',\n '00000000000',\n '000000000000',\n '0000000000000',\n '00000000000000',\n '000000000000000',\n '0000000000000000',\n '00000000000000000',\n '000000000000000000',\n '0000000000000000000',\n '00000000000000000000',\n '000000000000000000000',\n '0000000000000000000000',\n '00000000000000000000000',\n '000000000000000000000000',\n '0000000000000000000000000'\n ];\n\n var groupSizes = [\n 0, 0,\n 25, 16, 12, 11, 10, 9, 8,\n 8, 7, 7, 7, 7, 6, 6,\n 6, 6, 6, 6, 6, 5, 5,\n 5, 5, 5, 5, 5, 5, 5,\n 5, 5, 5, 5, 5, 5, 5\n ];\n\n var groupBases = [\n 0, 0,\n 33554432, 43046721, 16777216, 48828125, 60466176, 40353607, 16777216,\n 43046721, 10000000, 19487171, 35831808, 62748517, 7529536, 11390625,\n 16777216, 24137569, 34012224, 47045881, 64000000, 4084101, 5153632,\n 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,\n 24300000, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176\n ];\n\n BN.prototype.toString = function toString (base, padding) {\n base = base || 10;\n padding = padding | 0 || 1;\n\n var out;\n if (base === 16 || base === 'hex') {\n out = '';\n var off = 0;\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = this.words[i];\n var word = (((w << off) | carry) & 0xffffff).toString(16);\n carry = (w >>> (24 - off)) & 0xffffff;\n off += 2;\n if (off >= 26) {\n off -= 26;\n i--;\n }\n if (carry !== 0 || i !== this.length - 1) {\n out = zeros[6 - word.length] + word + out;\n } else {\n out = word + out;\n }\n }\n if (carry !== 0) {\n out = carry.toString(16) + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n if (base === (base | 0) && base >= 2 && base <= 36) {\n // var groupSize = Math.floor(BN.wordSize * Math.LN2 / Math.log(base));\n var groupSize = groupSizes[base];\n // var groupBase = Math.pow(base, groupSize);\n var groupBase = groupBases[base];\n out = '';\n var c = this.clone();\n c.negative = 0;\n while (!c.isZero()) {\n var r = c.modrn(groupBase).toString(base);\n c = c.idivn(groupBase);\n\n if (!c.isZero()) {\n out = zeros[groupSize - r.length] + r + out;\n } else {\n out = r + out;\n }\n }\n if (this.isZero()) {\n out = '0' + out;\n }\n while (out.length % padding !== 0) {\n out = '0' + out;\n }\n if (this.negative !== 0) {\n out = '-' + out;\n }\n return out;\n }\n\n assert(false, 'Base should be between 2 and 36');\n };\n\n BN.prototype.toNumber = function toNumber () {\n var ret = this.words[0];\n if (this.length === 2) {\n ret += this.words[1] * 0x4000000;\n } else if (this.length === 3 && this.words[2] === 0x01) {\n // NOTE: at this stage it is known that the top bit is set\n ret += 0x10000000000000 + (this.words[1] * 0x4000000);\n } else if (this.length > 2) {\n assert(false, 'Number can only safely store up to 53 bits');\n }\n return (this.negative !== 0) ? -ret : ret;\n };\n\n BN.prototype.toJSON = function toJSON () {\n return this.toString(16, 2);\n };\n\n if (Buffer) {\n BN.prototype.toBuffer = function toBuffer (endian, length) {\n return this.toArrayLike(Buffer, endian, length);\n };\n }\n\n BN.prototype.toArray = function toArray (endian, length) {\n return this.toArrayLike(Array, endian, length);\n };\n\n var allocate = function allocate (ArrayType, size) {\n if (ArrayType.allocUnsafe) {\n return ArrayType.allocUnsafe(size);\n }\n return new ArrayType(size);\n };\n\n BN.prototype.toArrayLike = function toArrayLike (ArrayType, endian, length) {\n this._strip();\n\n var byteLength = this.byteLength();\n var reqLength = length || Math.max(1, byteLength);\n assert(byteLength <= reqLength, 'byte array longer than desired length');\n assert(reqLength > 0, 'Requested array length <= 0');\n\n var res = allocate(ArrayType, reqLength);\n var postfix = endian === 'le' ? 'LE' : 'BE';\n this['_toArrayLike' + postfix](res, byteLength);\n return res;\n };\n\n BN.prototype._toArrayLikeLE = function _toArrayLikeLE (res, byteLength) {\n var position = 0;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position++] = word & 0xff;\n if (position < res.length) {\n res[position++] = (word >> 8) & 0xff;\n }\n if (position < res.length) {\n res[position++] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position < res.length) {\n res[position++] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position < res.length) {\n res[position++] = carry;\n\n while (position < res.length) {\n res[position++] = 0;\n }\n }\n };\n\n BN.prototype._toArrayLikeBE = function _toArrayLikeBE (res, byteLength) {\n var position = res.length - 1;\n var carry = 0;\n\n for (var i = 0, shift = 0; i < this.length; i++) {\n var word = (this.words[i] << shift) | carry;\n\n res[position--] = word & 0xff;\n if (position >= 0) {\n res[position--] = (word >> 8) & 0xff;\n }\n if (position >= 0) {\n res[position--] = (word >> 16) & 0xff;\n }\n\n if (shift === 6) {\n if (position >= 0) {\n res[position--] = (word >> 24) & 0xff;\n }\n carry = 0;\n shift = 0;\n } else {\n carry = word >>> 24;\n shift += 2;\n }\n }\n\n if (position >= 0) {\n res[position--] = carry;\n\n while (position >= 0) {\n res[position--] = 0;\n }\n }\n };\n\n if (Math.clz32) {\n BN.prototype._countBits = function _countBits (w) {\n return 32 - Math.clz32(w);\n };\n } else {\n BN.prototype._countBits = function _countBits (w) {\n var t = w;\n var r = 0;\n if (t >= 0x1000) {\n r += 13;\n t >>>= 13;\n }\n if (t >= 0x40) {\n r += 7;\n t >>>= 7;\n }\n if (t >= 0x8) {\n r += 4;\n t >>>= 4;\n }\n if (t >= 0x02) {\n r += 2;\n t >>>= 2;\n }\n return r + t;\n };\n }\n\n BN.prototype._zeroBits = function _zeroBits (w) {\n // Short-cut\n if (w === 0) return 26;\n\n var t = w;\n var r = 0;\n if ((t & 0x1fff) === 0) {\n r += 13;\n t >>>= 13;\n }\n if ((t & 0x7f) === 0) {\n r += 7;\n t >>>= 7;\n }\n if ((t & 0xf) === 0) {\n r += 4;\n t >>>= 4;\n }\n if ((t & 0x3) === 0) {\n r += 2;\n t >>>= 2;\n }\n if ((t & 0x1) === 0) {\n r++;\n }\n return r;\n };\n\n // Return number of used bits in a BN\n BN.prototype.bitLength = function bitLength () {\n var w = this.words[this.length - 1];\n var hi = this._countBits(w);\n return (this.length - 1) * 26 + hi;\n };\n\n function toBitArray (num) {\n var w = new Array(num.bitLength());\n\n for (var bit = 0; bit < w.length; bit++) {\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n w[bit] = (num.words[off] >>> wbit) & 0x01;\n }\n\n return w;\n }\n\n // Number of trailing zero bits\n BN.prototype.zeroBits = function zeroBits () {\n if (this.isZero()) return 0;\n\n var r = 0;\n for (var i = 0; i < this.length; i++) {\n var b = this._zeroBits(this.words[i]);\n r += b;\n if (b !== 26) break;\n }\n return r;\n };\n\n BN.prototype.byteLength = function byteLength () {\n return Math.ceil(this.bitLength() / 8);\n };\n\n BN.prototype.toTwos = function toTwos (width) {\n if (this.negative !== 0) {\n return this.abs().inotn(width).iaddn(1);\n }\n return this.clone();\n };\n\n BN.prototype.fromTwos = function fromTwos (width) {\n if (this.testn(width - 1)) {\n return this.notn(width).iaddn(1).ineg();\n }\n return this.clone();\n };\n\n BN.prototype.isNeg = function isNeg () {\n return this.negative !== 0;\n };\n\n // Return negative clone of `this`\n BN.prototype.neg = function neg () {\n return this.clone().ineg();\n };\n\n BN.prototype.ineg = function ineg () {\n if (!this.isZero()) {\n this.negative ^= 1;\n }\n\n return this;\n };\n\n // Or `num` with `this` in-place\n BN.prototype.iuor = function iuor (num) {\n while (this.length < num.length) {\n this.words[this.length++] = 0;\n }\n\n for (var i = 0; i < num.length; i++) {\n this.words[i] = this.words[i] | num.words[i];\n }\n\n return this._strip();\n };\n\n BN.prototype.ior = function ior (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuor(num);\n };\n\n // Or `num` with `this`\n BN.prototype.or = function or (num) {\n if (this.length > num.length) return this.clone().ior(num);\n return num.clone().ior(this);\n };\n\n BN.prototype.uor = function uor (num) {\n if (this.length > num.length) return this.clone().iuor(num);\n return num.clone().iuor(this);\n };\n\n // And `num` with `this` in-place\n BN.prototype.iuand = function iuand (num) {\n // b = min-length(num, this)\n var b;\n if (this.length > num.length) {\n b = num;\n } else {\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = this.words[i] & num.words[i];\n }\n\n this.length = b.length;\n\n return this._strip();\n };\n\n BN.prototype.iand = function iand (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuand(num);\n };\n\n // And `num` with `this`\n BN.prototype.and = function and (num) {\n if (this.length > num.length) return this.clone().iand(num);\n return num.clone().iand(this);\n };\n\n BN.prototype.uand = function uand (num) {\n if (this.length > num.length) return this.clone().iuand(num);\n return num.clone().iuand(this);\n };\n\n // Xor `num` with `this` in-place\n BN.prototype.iuxor = function iuxor (num) {\n // a.length > b.length\n var a;\n var b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n for (var i = 0; i < b.length; i++) {\n this.words[i] = a.words[i] ^ b.words[i];\n }\n\n if (this !== a) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = a.length;\n\n return this._strip();\n };\n\n BN.prototype.ixor = function ixor (num) {\n assert((this.negative | num.negative) === 0);\n return this.iuxor(num);\n };\n\n // Xor `num` with `this`\n BN.prototype.xor = function xor (num) {\n if (this.length > num.length) return this.clone().ixor(num);\n return num.clone().ixor(this);\n };\n\n BN.prototype.uxor = function uxor (num) {\n if (this.length > num.length) return this.clone().iuxor(num);\n return num.clone().iuxor(this);\n };\n\n // Not ``this`` with ``width`` bitwidth\n BN.prototype.inotn = function inotn (width) {\n assert(typeof width === 'number' && width >= 0);\n\n var bytesNeeded = Math.ceil(width / 26) | 0;\n var bitsLeft = width % 26;\n\n // Extend the buffer with leading zeroes\n this._expand(bytesNeeded);\n\n if (bitsLeft > 0) {\n bytesNeeded--;\n }\n\n // Handle complete words\n for (var i = 0; i < bytesNeeded; i++) {\n this.words[i] = ~this.words[i] & 0x3ffffff;\n }\n\n // Handle the residue\n if (bitsLeft > 0) {\n this.words[i] = ~this.words[i] & (0x3ffffff >> (26 - bitsLeft));\n }\n\n // And remove leading zeroes\n return this._strip();\n };\n\n BN.prototype.notn = function notn (width) {\n return this.clone().inotn(width);\n };\n\n // Set `bit` of `this`\n BN.prototype.setn = function setn (bit, val) {\n assert(typeof bit === 'number' && bit >= 0);\n\n var off = (bit / 26) | 0;\n var wbit = bit % 26;\n\n this._expand(off + 1);\n\n if (val) {\n this.words[off] = this.words[off] | (1 << wbit);\n } else {\n this.words[off] = this.words[off] & ~(1 << wbit);\n }\n\n return this._strip();\n };\n\n // Add `num` to `this` in-place\n BN.prototype.iadd = function iadd (num) {\n var r;\n\n // negative + positive\n if (this.negative !== 0 && num.negative === 0) {\n this.negative = 0;\n r = this.isub(num);\n this.negative ^= 1;\n return this._normSign();\n\n // positive + negative\n } else if (this.negative === 0 && num.negative !== 0) {\n num.negative = 0;\n r = this.isub(num);\n num.negative = 1;\n return r._normSign();\n }\n\n // a.length > b.length\n var a, b;\n if (this.length > num.length) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) + (b.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n this.words[i] = r & 0x3ffffff;\n carry = r >>> 26;\n }\n\n this.length = a.length;\n if (carry !== 0) {\n this.words[this.length] = carry;\n this.length++;\n // Copy the rest of the words\n } else if (a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n return this;\n };\n\n // Add `num` to `this`\n BN.prototype.add = function add (num) {\n var res;\n if (num.negative !== 0 && this.negative === 0) {\n num.negative = 0;\n res = this.sub(num);\n num.negative ^= 1;\n return res;\n } else if (num.negative === 0 && this.negative !== 0) {\n this.negative = 0;\n res = num.sub(this);\n this.negative = 1;\n return res;\n }\n\n if (this.length > num.length) return this.clone().iadd(num);\n\n return num.clone().iadd(this);\n };\n\n // Subtract `num` from `this` in-place\n BN.prototype.isub = function isub (num) {\n // this - (-num) = this + num\n if (num.negative !== 0) {\n num.negative = 0;\n var r = this.iadd(num);\n num.negative = 1;\n return r._normSign();\n\n // -this - num = -(this + num)\n } else if (this.negative !== 0) {\n this.negative = 0;\n this.iadd(num);\n this.negative = 1;\n return this._normSign();\n }\n\n // At this point both numbers are positive\n var cmp = this.cmp(num);\n\n // Optimization - zeroify\n if (cmp === 0) {\n this.negative = 0;\n this.length = 1;\n this.words[0] = 0;\n return this;\n }\n\n // a > b\n var a, b;\n if (cmp > 0) {\n a = this;\n b = num;\n } else {\n a = num;\n b = this;\n }\n\n var carry = 0;\n for (var i = 0; i < b.length; i++) {\n r = (a.words[i] | 0) - (b.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n for (; carry !== 0 && i < a.length; i++) {\n r = (a.words[i] | 0) + carry;\n carry = r >> 26;\n this.words[i] = r & 0x3ffffff;\n }\n\n // Copy rest of the words\n if (carry === 0 && i < a.length && a !== this) {\n for (; i < a.length; i++) {\n this.words[i] = a.words[i];\n }\n }\n\n this.length = Math.max(this.length, i);\n\n if (a !== this) {\n this.negative = 1;\n }\n\n return this._strip();\n };\n\n // Subtract `num` from `this`\n BN.prototype.sub = function sub (num) {\n return this.clone().isub(num);\n };\n\n function smallMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n var len = (self.length + num.length) | 0;\n out.length = len;\n len = (len - 1) | 0;\n\n // Peel one iteration (compiler can't do it, because of code complexity)\n var a = self.words[0] | 0;\n var b = num.words[0] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n var carry = (r / 0x4000000) | 0;\n out.words[0] = lo;\n\n for (var k = 1; k < len; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = carry >>> 26;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = (k - j) | 0;\n a = self.words[i] | 0;\n b = num.words[j] | 0;\n r = a * b + rword;\n ncarry += (r / 0x4000000) | 0;\n rword = r & 0x3ffffff;\n }\n out.words[k] = rword | 0;\n carry = ncarry | 0;\n }\n if (carry !== 0) {\n out.words[k] = carry | 0;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n // TODO(indutny): it may be reasonable to omit it for users who don't need\n // to work with 256-bit numbers, otherwise it gives 20% improvement for 256-bit\n // multiplication (like elliptic secp256k1).\n var comb10MulTo = function comb10MulTo (self, num, out) {\n var a = self.words;\n var b = num.words;\n var o = out.words;\n var c = 0;\n var lo;\n var mid;\n var hi;\n var a0 = a[0] | 0;\n var al0 = a0 & 0x1fff;\n var ah0 = a0 >>> 13;\n var a1 = a[1] | 0;\n var al1 = a1 & 0x1fff;\n var ah1 = a1 >>> 13;\n var a2 = a[2] | 0;\n var al2 = a2 & 0x1fff;\n var ah2 = a2 >>> 13;\n var a3 = a[3] | 0;\n var al3 = a3 & 0x1fff;\n var ah3 = a3 >>> 13;\n var a4 = a[4] | 0;\n var al4 = a4 & 0x1fff;\n var ah4 = a4 >>> 13;\n var a5 = a[5] | 0;\n var al5 = a5 & 0x1fff;\n var ah5 = a5 >>> 13;\n var a6 = a[6] | 0;\n var al6 = a6 & 0x1fff;\n var ah6 = a6 >>> 13;\n var a7 = a[7] | 0;\n var al7 = a7 & 0x1fff;\n var ah7 = a7 >>> 13;\n var a8 = a[8] | 0;\n var al8 = a8 & 0x1fff;\n var ah8 = a8 >>> 13;\n var a9 = a[9] | 0;\n var al9 = a9 & 0x1fff;\n var ah9 = a9 >>> 13;\n var b0 = b[0] | 0;\n var bl0 = b0 & 0x1fff;\n var bh0 = b0 >>> 13;\n var b1 = b[1] | 0;\n var bl1 = b1 & 0x1fff;\n var bh1 = b1 >>> 13;\n var b2 = b[2] | 0;\n var bl2 = b2 & 0x1fff;\n var bh2 = b2 >>> 13;\n var b3 = b[3] | 0;\n var bl3 = b3 & 0x1fff;\n var bh3 = b3 >>> 13;\n var b4 = b[4] | 0;\n var bl4 = b4 & 0x1fff;\n var bh4 = b4 >>> 13;\n var b5 = b[5] | 0;\n var bl5 = b5 & 0x1fff;\n var bh5 = b5 >>> 13;\n var b6 = b[6] | 0;\n var bl6 = b6 & 0x1fff;\n var bh6 = b6 >>> 13;\n var b7 = b[7] | 0;\n var bl7 = b7 & 0x1fff;\n var bh7 = b7 >>> 13;\n var b8 = b[8] | 0;\n var bl8 = b8 & 0x1fff;\n var bh8 = b8 >>> 13;\n var b9 = b[9] | 0;\n var bl9 = b9 & 0x1fff;\n var bh9 = b9 >>> 13;\n\n out.negative = self.negative ^ num.negative;\n out.length = 19;\n /* k = 0 */\n lo = Math.imul(al0, bl0);\n mid = Math.imul(al0, bh0);\n mid = (mid + Math.imul(ah0, bl0)) | 0;\n hi = Math.imul(ah0, bh0);\n var w0 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w0 >>> 26)) | 0;\n w0 &= 0x3ffffff;\n /* k = 1 */\n lo = Math.imul(al1, bl0);\n mid = Math.imul(al1, bh0);\n mid = (mid + Math.imul(ah1, bl0)) | 0;\n hi = Math.imul(ah1, bh0);\n lo = (lo + Math.imul(al0, bl1)) | 0;\n mid = (mid + Math.imul(al0, bh1)) | 0;\n mid = (mid + Math.imul(ah0, bl1)) | 0;\n hi = (hi + Math.imul(ah0, bh1)) | 0;\n var w1 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w1 >>> 26)) | 0;\n w1 &= 0x3ffffff;\n /* k = 2 */\n lo = Math.imul(al2, bl0);\n mid = Math.imul(al2, bh0);\n mid = (mid + Math.imul(ah2, bl0)) | 0;\n hi = Math.imul(ah2, bh0);\n lo = (lo + Math.imul(al1, bl1)) | 0;\n mid = (mid + Math.imul(al1, bh1)) | 0;\n mid = (mid + Math.imul(ah1, bl1)) | 0;\n hi = (hi + Math.imul(ah1, bh1)) | 0;\n lo = (lo + Math.imul(al0, bl2)) | 0;\n mid = (mid + Math.imul(al0, bh2)) | 0;\n mid = (mid + Math.imul(ah0, bl2)) | 0;\n hi = (hi + Math.imul(ah0, bh2)) | 0;\n var w2 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w2 >>> 26)) | 0;\n w2 &= 0x3ffffff;\n /* k = 3 */\n lo = Math.imul(al3, bl0);\n mid = Math.imul(al3, bh0);\n mid = (mid + Math.imul(ah3, bl0)) | 0;\n hi = Math.imul(ah3, bh0);\n lo = (lo + Math.imul(al2, bl1)) | 0;\n mid = (mid + Math.imul(al2, bh1)) | 0;\n mid = (mid + Math.imul(ah2, bl1)) | 0;\n hi = (hi + Math.imul(ah2, bh1)) | 0;\n lo = (lo + Math.imul(al1, bl2)) | 0;\n mid = (mid + Math.imul(al1, bh2)) | 0;\n mid = (mid + Math.imul(ah1, bl2)) | 0;\n hi = (hi + Math.imul(ah1, bh2)) | 0;\n lo = (lo + Math.imul(al0, bl3)) | 0;\n mid = (mid + Math.imul(al0, bh3)) | 0;\n mid = (mid + Math.imul(ah0, bl3)) | 0;\n hi = (hi + Math.imul(ah0, bh3)) | 0;\n var w3 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w3 >>> 26)) | 0;\n w3 &= 0x3ffffff;\n /* k = 4 */\n lo = Math.imul(al4, bl0);\n mid = Math.imul(al4, bh0);\n mid = (mid + Math.imul(ah4, bl0)) | 0;\n hi = Math.imul(ah4, bh0);\n lo = (lo + Math.imul(al3, bl1)) | 0;\n mid = (mid + Math.imul(al3, bh1)) | 0;\n mid = (mid + Math.imul(ah3, bl1)) | 0;\n hi = (hi + Math.imul(ah3, bh1)) | 0;\n lo = (lo + Math.imul(al2, bl2)) | 0;\n mid = (mid + Math.imul(al2, bh2)) | 0;\n mid = (mid + Math.imul(ah2, bl2)) | 0;\n hi = (hi + Math.imul(ah2, bh2)) | 0;\n lo = (lo + Math.imul(al1, bl3)) | 0;\n mid = (mid + Math.imul(al1, bh3)) | 0;\n mid = (mid + Math.imul(ah1, bl3)) | 0;\n hi = (hi + Math.imul(ah1, bh3)) | 0;\n lo = (lo + Math.imul(al0, bl4)) | 0;\n mid = (mid + Math.imul(al0, bh4)) | 0;\n mid = (mid + Math.imul(ah0, bl4)) | 0;\n hi = (hi + Math.imul(ah0, bh4)) | 0;\n var w4 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w4 >>> 26)) | 0;\n w4 &= 0x3ffffff;\n /* k = 5 */\n lo = Math.imul(al5, bl0);\n mid = Math.imul(al5, bh0);\n mid = (mid + Math.imul(ah5, bl0)) | 0;\n hi = Math.imul(ah5, bh0);\n lo = (lo + Math.imul(al4, bl1)) | 0;\n mid = (mid + Math.imul(al4, bh1)) | 0;\n mid = (mid + Math.imul(ah4, bl1)) | 0;\n hi = (hi + Math.imul(ah4, bh1)) | 0;\n lo = (lo + Math.imul(al3, bl2)) | 0;\n mid = (mid + Math.imul(al3, bh2)) | 0;\n mid = (mid + Math.imul(ah3, bl2)) | 0;\n hi = (hi + Math.imul(ah3, bh2)) | 0;\n lo = (lo + Math.imul(al2, bl3)) | 0;\n mid = (mid + Math.imul(al2, bh3)) | 0;\n mid = (mid + Math.imul(ah2, bl3)) | 0;\n hi = (hi + Math.imul(ah2, bh3)) | 0;\n lo = (lo + Math.imul(al1, bl4)) | 0;\n mid = (mid + Math.imul(al1, bh4)) | 0;\n mid = (mid + Math.imul(ah1, bl4)) | 0;\n hi = (hi + Math.imul(ah1, bh4)) | 0;\n lo = (lo + Math.imul(al0, bl5)) | 0;\n mid = (mid + Math.imul(al0, bh5)) | 0;\n mid = (mid + Math.imul(ah0, bl5)) | 0;\n hi = (hi + Math.imul(ah0, bh5)) | 0;\n var w5 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w5 >>> 26)) | 0;\n w5 &= 0x3ffffff;\n /* k = 6 */\n lo = Math.imul(al6, bl0);\n mid = Math.imul(al6, bh0);\n mid = (mid + Math.imul(ah6, bl0)) | 0;\n hi = Math.imul(ah6, bh0);\n lo = (lo + Math.imul(al5, bl1)) | 0;\n mid = (mid + Math.imul(al5, bh1)) | 0;\n mid = (mid + Math.imul(ah5, bl1)) | 0;\n hi = (hi + Math.imul(ah5, bh1)) | 0;\n lo = (lo + Math.imul(al4, bl2)) | 0;\n mid = (mid + Math.imul(al4, bh2)) | 0;\n mid = (mid + Math.imul(ah4, bl2)) | 0;\n hi = (hi + Math.imul(ah4, bh2)) | 0;\n lo = (lo + Math.imul(al3, bl3)) | 0;\n mid = (mid + Math.imul(al3, bh3)) | 0;\n mid = (mid + Math.imul(ah3, bl3)) | 0;\n hi = (hi + Math.imul(ah3, bh3)) | 0;\n lo = (lo + Math.imul(al2, bl4)) | 0;\n mid = (mid + Math.imul(al2, bh4)) | 0;\n mid = (mid + Math.imul(ah2, bl4)) | 0;\n hi = (hi + Math.imul(ah2, bh4)) | 0;\n lo = (lo + Math.imul(al1, bl5)) | 0;\n mid = (mid + Math.imul(al1, bh5)) | 0;\n mid = (mid + Math.imul(ah1, bl5)) | 0;\n hi = (hi + Math.imul(ah1, bh5)) | 0;\n lo = (lo + Math.imul(al0, bl6)) | 0;\n mid = (mid + Math.imul(al0, bh6)) | 0;\n mid = (mid + Math.imul(ah0, bl6)) | 0;\n hi = (hi + Math.imul(ah0, bh6)) | 0;\n var w6 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w6 >>> 26)) | 0;\n w6 &= 0x3ffffff;\n /* k = 7 */\n lo = Math.imul(al7, bl0);\n mid = Math.imul(al7, bh0);\n mid = (mid + Math.imul(ah7, bl0)) | 0;\n hi = Math.imul(ah7, bh0);\n lo = (lo + Math.imul(al6, bl1)) | 0;\n mid = (mid + Math.imul(al6, bh1)) | 0;\n mid = (mid + Math.imul(ah6, bl1)) | 0;\n hi = (hi + Math.imul(ah6, bh1)) | 0;\n lo = (lo + Math.imul(al5, bl2)) | 0;\n mid = (mid + Math.imul(al5, bh2)) | 0;\n mid = (mid + Math.imul(ah5, bl2)) | 0;\n hi = (hi + Math.imul(ah5, bh2)) | 0;\n lo = (lo + Math.imul(al4, bl3)) | 0;\n mid = (mid + Math.imul(al4, bh3)) | 0;\n mid = (mid + Math.imul(ah4, bl3)) | 0;\n hi = (hi + Math.imul(ah4, bh3)) | 0;\n lo = (lo + Math.imul(al3, bl4)) | 0;\n mid = (mid + Math.imul(al3, bh4)) | 0;\n mid = (mid + Math.imul(ah3, bl4)) | 0;\n hi = (hi + Math.imul(ah3, bh4)) | 0;\n lo = (lo + Math.imul(al2, bl5)) | 0;\n mid = (mid + Math.imul(al2, bh5)) | 0;\n mid = (mid + Math.imul(ah2, bl5)) | 0;\n hi = (hi + Math.imul(ah2, bh5)) | 0;\n lo = (lo + Math.imul(al1, bl6)) | 0;\n mid = (mid + Math.imul(al1, bh6)) | 0;\n mid = (mid + Math.imul(ah1, bl6)) | 0;\n hi = (hi + Math.imul(ah1, bh6)) | 0;\n lo = (lo + Math.imul(al0, bl7)) | 0;\n mid = (mid + Math.imul(al0, bh7)) | 0;\n mid = (mid + Math.imul(ah0, bl7)) | 0;\n hi = (hi + Math.imul(ah0, bh7)) | 0;\n var w7 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w7 >>> 26)) | 0;\n w7 &= 0x3ffffff;\n /* k = 8 */\n lo = Math.imul(al8, bl0);\n mid = Math.imul(al8, bh0);\n mid = (mid + Math.imul(ah8, bl0)) | 0;\n hi = Math.imul(ah8, bh0);\n lo = (lo + Math.imul(al7, bl1)) | 0;\n mid = (mid + Math.imul(al7, bh1)) | 0;\n mid = (mid + Math.imul(ah7, bl1)) | 0;\n hi = (hi + Math.imul(ah7, bh1)) | 0;\n lo = (lo + Math.imul(al6, bl2)) | 0;\n mid = (mid + Math.imul(al6, bh2)) | 0;\n mid = (mid + Math.imul(ah6, bl2)) | 0;\n hi = (hi + Math.imul(ah6, bh2)) | 0;\n lo = (lo + Math.imul(al5, bl3)) | 0;\n mid = (mid + Math.imul(al5, bh3)) | 0;\n mid = (mid + Math.imul(ah5, bl3)) | 0;\n hi = (hi + Math.imul(ah5, bh3)) | 0;\n lo = (lo + Math.imul(al4, bl4)) | 0;\n mid = (mid + Math.imul(al4, bh4)) | 0;\n mid = (mid + Math.imul(ah4, bl4)) | 0;\n hi = (hi + Math.imul(ah4, bh4)) | 0;\n lo = (lo + Math.imul(al3, bl5)) | 0;\n mid = (mid + Math.imul(al3, bh5)) | 0;\n mid = (mid + Math.imul(ah3, bl5)) | 0;\n hi = (hi + Math.imul(ah3, bh5)) | 0;\n lo = (lo + Math.imul(al2, bl6)) | 0;\n mid = (mid + Math.imul(al2, bh6)) | 0;\n mid = (mid + Math.imul(ah2, bl6)) | 0;\n hi = (hi + Math.imul(ah2, bh6)) | 0;\n lo = (lo + Math.imul(al1, bl7)) | 0;\n mid = (mid + Math.imul(al1, bh7)) | 0;\n mid = (mid + Math.imul(ah1, bl7)) | 0;\n hi = (hi + Math.imul(ah1, bh7)) | 0;\n lo = (lo + Math.imul(al0, bl8)) | 0;\n mid = (mid + Math.imul(al0, bh8)) | 0;\n mid = (mid + Math.imul(ah0, bl8)) | 0;\n hi = (hi + Math.imul(ah0, bh8)) | 0;\n var w8 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w8 >>> 26)) | 0;\n w8 &= 0x3ffffff;\n /* k = 9 */\n lo = Math.imul(al9, bl0);\n mid = Math.imul(al9, bh0);\n mid = (mid + Math.imul(ah9, bl0)) | 0;\n hi = Math.imul(ah9, bh0);\n lo = (lo + Math.imul(al8, bl1)) | 0;\n mid = (mid + Math.imul(al8, bh1)) | 0;\n mid = (mid + Math.imul(ah8, bl1)) | 0;\n hi = (hi + Math.imul(ah8, bh1)) | 0;\n lo = (lo + Math.imul(al7, bl2)) | 0;\n mid = (mid + Math.imul(al7, bh2)) | 0;\n mid = (mid + Math.imul(ah7, bl2)) | 0;\n hi = (hi + Math.imul(ah7, bh2)) | 0;\n lo = (lo + Math.imul(al6, bl3)) | 0;\n mid = (mid + Math.imul(al6, bh3)) | 0;\n mid = (mid + Math.imul(ah6, bl3)) | 0;\n hi = (hi + Math.imul(ah6, bh3)) | 0;\n lo = (lo + Math.imul(al5, bl4)) | 0;\n mid = (mid + Math.imul(al5, bh4)) | 0;\n mid = (mid + Math.imul(ah5, bl4)) | 0;\n hi = (hi + Math.imul(ah5, bh4)) | 0;\n lo = (lo + Math.imul(al4, bl5)) | 0;\n mid = (mid + Math.imul(al4, bh5)) | 0;\n mid = (mid + Math.imul(ah4, bl5)) | 0;\n hi = (hi + Math.imul(ah4, bh5)) | 0;\n lo = (lo + Math.imul(al3, bl6)) | 0;\n mid = (mid + Math.imul(al3, bh6)) | 0;\n mid = (mid + Math.imul(ah3, bl6)) | 0;\n hi = (hi + Math.imul(ah3, bh6)) | 0;\n lo = (lo + Math.imul(al2, bl7)) | 0;\n mid = (mid + Math.imul(al2, bh7)) | 0;\n mid = (mid + Math.imul(ah2, bl7)) | 0;\n hi = (hi + Math.imul(ah2, bh7)) | 0;\n lo = (lo + Math.imul(al1, bl8)) | 0;\n mid = (mid + Math.imul(al1, bh8)) | 0;\n mid = (mid + Math.imul(ah1, bl8)) | 0;\n hi = (hi + Math.imul(ah1, bh8)) | 0;\n lo = (lo + Math.imul(al0, bl9)) | 0;\n mid = (mid + Math.imul(al0, bh9)) | 0;\n mid = (mid + Math.imul(ah0, bl9)) | 0;\n hi = (hi + Math.imul(ah0, bh9)) | 0;\n var w9 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w9 >>> 26)) | 0;\n w9 &= 0x3ffffff;\n /* k = 10 */\n lo = Math.imul(al9, bl1);\n mid = Math.imul(al9, bh1);\n mid = (mid + Math.imul(ah9, bl1)) | 0;\n hi = Math.imul(ah9, bh1);\n lo = (lo + Math.imul(al8, bl2)) | 0;\n mid = (mid + Math.imul(al8, bh2)) | 0;\n mid = (mid + Math.imul(ah8, bl2)) | 0;\n hi = (hi + Math.imul(ah8, bh2)) | 0;\n lo = (lo + Math.imul(al7, bl3)) | 0;\n mid = (mid + Math.imul(al7, bh3)) | 0;\n mid = (mid + Math.imul(ah7, bl3)) | 0;\n hi = (hi + Math.imul(ah7, bh3)) | 0;\n lo = (lo + Math.imul(al6, bl4)) | 0;\n mid = (mid + Math.imul(al6, bh4)) | 0;\n mid = (mid + Math.imul(ah6, bl4)) | 0;\n hi = (hi + Math.imul(ah6, bh4)) | 0;\n lo = (lo + Math.imul(al5, bl5)) | 0;\n mid = (mid + Math.imul(al5, bh5)) | 0;\n mid = (mid + Math.imul(ah5, bl5)) | 0;\n hi = (hi + Math.imul(ah5, bh5)) | 0;\n lo = (lo + Math.imul(al4, bl6)) | 0;\n mid = (mid + Math.imul(al4, bh6)) | 0;\n mid = (mid + Math.imul(ah4, bl6)) | 0;\n hi = (hi + Math.imul(ah4, bh6)) | 0;\n lo = (lo + Math.imul(al3, bl7)) | 0;\n mid = (mid + Math.imul(al3, bh7)) | 0;\n mid = (mid + Math.imul(ah3, bl7)) | 0;\n hi = (hi + Math.imul(ah3, bh7)) | 0;\n lo = (lo + Math.imul(al2, bl8)) | 0;\n mid = (mid + Math.imul(al2, bh8)) | 0;\n mid = (mid + Math.imul(ah2, bl8)) | 0;\n hi = (hi + Math.imul(ah2, bh8)) | 0;\n lo = (lo + Math.imul(al1, bl9)) | 0;\n mid = (mid + Math.imul(al1, bh9)) | 0;\n mid = (mid + Math.imul(ah1, bl9)) | 0;\n hi = (hi + Math.imul(ah1, bh9)) | 0;\n var w10 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w10 >>> 26)) | 0;\n w10 &= 0x3ffffff;\n /* k = 11 */\n lo = Math.imul(al9, bl2);\n mid = Math.imul(al9, bh2);\n mid = (mid + Math.imul(ah9, bl2)) | 0;\n hi = Math.imul(ah9, bh2);\n lo = (lo + Math.imul(al8, bl3)) | 0;\n mid = (mid + Math.imul(al8, bh3)) | 0;\n mid = (mid + Math.imul(ah8, bl3)) | 0;\n hi = (hi + Math.imul(ah8, bh3)) | 0;\n lo = (lo + Math.imul(al7, bl4)) | 0;\n mid = (mid + Math.imul(al7, bh4)) | 0;\n mid = (mid + Math.imul(ah7, bl4)) | 0;\n hi = (hi + Math.imul(ah7, bh4)) | 0;\n lo = (lo + Math.imul(al6, bl5)) | 0;\n mid = (mid + Math.imul(al6, bh5)) | 0;\n mid = (mid + Math.imul(ah6, bl5)) | 0;\n hi = (hi + Math.imul(ah6, bh5)) | 0;\n lo = (lo + Math.imul(al5, bl6)) | 0;\n mid = (mid + Math.imul(al5, bh6)) | 0;\n mid = (mid + Math.imul(ah5, bl6)) | 0;\n hi = (hi + Math.imul(ah5, bh6)) | 0;\n lo = (lo + Math.imul(al4, bl7)) | 0;\n mid = (mid + Math.imul(al4, bh7)) | 0;\n mid = (mid + Math.imul(ah4, bl7)) | 0;\n hi = (hi + Math.imul(ah4, bh7)) | 0;\n lo = (lo + Math.imul(al3, bl8)) | 0;\n mid = (mid + Math.imul(al3, bh8)) | 0;\n mid = (mid + Math.imul(ah3, bl8)) | 0;\n hi = (hi + Math.imul(ah3, bh8)) | 0;\n lo = (lo + Math.imul(al2, bl9)) | 0;\n mid = (mid + Math.imul(al2, bh9)) | 0;\n mid = (mid + Math.imul(ah2, bl9)) | 0;\n hi = (hi + Math.imul(ah2, bh9)) | 0;\n var w11 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w11 >>> 26)) | 0;\n w11 &= 0x3ffffff;\n /* k = 12 */\n lo = Math.imul(al9, bl3);\n mid = Math.imul(al9, bh3);\n mid = (mid + Math.imul(ah9, bl3)) | 0;\n hi = Math.imul(ah9, bh3);\n lo = (lo + Math.imul(al8, bl4)) | 0;\n mid = (mid + Math.imul(al8, bh4)) | 0;\n mid = (mid + Math.imul(ah8, bl4)) | 0;\n hi = (hi + Math.imul(ah8, bh4)) | 0;\n lo = (lo + Math.imul(al7, bl5)) | 0;\n mid = (mid + Math.imul(al7, bh5)) | 0;\n mid = (mid + Math.imul(ah7, bl5)) | 0;\n hi = (hi + Math.imul(ah7, bh5)) | 0;\n lo = (lo + Math.imul(al6, bl6)) | 0;\n mid = (mid + Math.imul(al6, bh6)) | 0;\n mid = (mid + Math.imul(ah6, bl6)) | 0;\n hi = (hi + Math.imul(ah6, bh6)) | 0;\n lo = (lo + Math.imul(al5, bl7)) | 0;\n mid = (mid + Math.imul(al5, bh7)) | 0;\n mid = (mid + Math.imul(ah5, bl7)) | 0;\n hi = (hi + Math.imul(ah5, bh7)) | 0;\n lo = (lo + Math.imul(al4, bl8)) | 0;\n mid = (mid + Math.imul(al4, bh8)) | 0;\n mid = (mid + Math.imul(ah4, bl8)) | 0;\n hi = (hi + Math.imul(ah4, bh8)) | 0;\n lo = (lo + Math.imul(al3, bl9)) | 0;\n mid = (mid + Math.imul(al3, bh9)) | 0;\n mid = (mid + Math.imul(ah3, bl9)) | 0;\n hi = (hi + Math.imul(ah3, bh9)) | 0;\n var w12 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w12 >>> 26)) | 0;\n w12 &= 0x3ffffff;\n /* k = 13 */\n lo = Math.imul(al9, bl4);\n mid = Math.imul(al9, bh4);\n mid = (mid + Math.imul(ah9, bl4)) | 0;\n hi = Math.imul(ah9, bh4);\n lo = (lo + Math.imul(al8, bl5)) | 0;\n mid = (mid + Math.imul(al8, bh5)) | 0;\n mid = (mid + Math.imul(ah8, bl5)) | 0;\n hi = (hi + Math.imul(ah8, bh5)) | 0;\n lo = (lo + Math.imul(al7, bl6)) | 0;\n mid = (mid + Math.imul(al7, bh6)) | 0;\n mid = (mid + Math.imul(ah7, bl6)) | 0;\n hi = (hi + Math.imul(ah7, bh6)) | 0;\n lo = (lo + Math.imul(al6, bl7)) | 0;\n mid = (mid + Math.imul(al6, bh7)) | 0;\n mid = (mid + Math.imul(ah6, bl7)) | 0;\n hi = (hi + Math.imul(ah6, bh7)) | 0;\n lo = (lo + Math.imul(al5, bl8)) | 0;\n mid = (mid + Math.imul(al5, bh8)) | 0;\n mid = (mid + Math.imul(ah5, bl8)) | 0;\n hi = (hi + Math.imul(ah5, bh8)) | 0;\n lo = (lo + Math.imul(al4, bl9)) | 0;\n mid = (mid + Math.imul(al4, bh9)) | 0;\n mid = (mid + Math.imul(ah4, bl9)) | 0;\n hi = (hi + Math.imul(ah4, bh9)) | 0;\n var w13 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w13 >>> 26)) | 0;\n w13 &= 0x3ffffff;\n /* k = 14 */\n lo = Math.imul(al9, bl5);\n mid = Math.imul(al9, bh5);\n mid = (mid + Math.imul(ah9, bl5)) | 0;\n hi = Math.imul(ah9, bh5);\n lo = (lo + Math.imul(al8, bl6)) | 0;\n mid = (mid + Math.imul(al8, bh6)) | 0;\n mid = (mid + Math.imul(ah8, bl6)) | 0;\n hi = (hi + Math.imul(ah8, bh6)) | 0;\n lo = (lo + Math.imul(al7, bl7)) | 0;\n mid = (mid + Math.imul(al7, bh7)) | 0;\n mid = (mid + Math.imul(ah7, bl7)) | 0;\n hi = (hi + Math.imul(ah7, bh7)) | 0;\n lo = (lo + Math.imul(al6, bl8)) | 0;\n mid = (mid + Math.imul(al6, bh8)) | 0;\n mid = (mid + Math.imul(ah6, bl8)) | 0;\n hi = (hi + Math.imul(ah6, bh8)) | 0;\n lo = (lo + Math.imul(al5, bl9)) | 0;\n mid = (mid + Math.imul(al5, bh9)) | 0;\n mid = (mid + Math.imul(ah5, bl9)) | 0;\n hi = (hi + Math.imul(ah5, bh9)) | 0;\n var w14 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w14 >>> 26)) | 0;\n w14 &= 0x3ffffff;\n /* k = 15 */\n lo = Math.imul(al9, bl6);\n mid = Math.imul(al9, bh6);\n mid = (mid + Math.imul(ah9, bl6)) | 0;\n hi = Math.imul(ah9, bh6);\n lo = (lo + Math.imul(al8, bl7)) | 0;\n mid = (mid + Math.imul(al8, bh7)) | 0;\n mid = (mid + Math.imul(ah8, bl7)) | 0;\n hi = (hi + Math.imul(ah8, bh7)) | 0;\n lo = (lo + Math.imul(al7, bl8)) | 0;\n mid = (mid + Math.imul(al7, bh8)) | 0;\n mid = (mid + Math.imul(ah7, bl8)) | 0;\n hi = (hi + Math.imul(ah7, bh8)) | 0;\n lo = (lo + Math.imul(al6, bl9)) | 0;\n mid = (mid + Math.imul(al6, bh9)) | 0;\n mid = (mid + Math.imul(ah6, bl9)) | 0;\n hi = (hi + Math.imul(ah6, bh9)) | 0;\n var w15 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w15 >>> 26)) | 0;\n w15 &= 0x3ffffff;\n /* k = 16 */\n lo = Math.imul(al9, bl7);\n mid = Math.imul(al9, bh7);\n mid = (mid + Math.imul(ah9, bl7)) | 0;\n hi = Math.imul(ah9, bh7);\n lo = (lo + Math.imul(al8, bl8)) | 0;\n mid = (mid + Math.imul(al8, bh8)) | 0;\n mid = (mid + Math.imul(ah8, bl8)) | 0;\n hi = (hi + Math.imul(ah8, bh8)) | 0;\n lo = (lo + Math.imul(al7, bl9)) | 0;\n mid = (mid + Math.imul(al7, bh9)) | 0;\n mid = (mid + Math.imul(ah7, bl9)) | 0;\n hi = (hi + Math.imul(ah7, bh9)) | 0;\n var w16 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w16 >>> 26)) | 0;\n w16 &= 0x3ffffff;\n /* k = 17 */\n lo = Math.imul(al9, bl8);\n mid = Math.imul(al9, bh8);\n mid = (mid + Math.imul(ah9, bl8)) | 0;\n hi = Math.imul(ah9, bh8);\n lo = (lo + Math.imul(al8, bl9)) | 0;\n mid = (mid + Math.imul(al8, bh9)) | 0;\n mid = (mid + Math.imul(ah8, bl9)) | 0;\n hi = (hi + Math.imul(ah8, bh9)) | 0;\n var w17 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w17 >>> 26)) | 0;\n w17 &= 0x3ffffff;\n /* k = 18 */\n lo = Math.imul(al9, bl9);\n mid = Math.imul(al9, bh9);\n mid = (mid + Math.imul(ah9, bl9)) | 0;\n hi = Math.imul(ah9, bh9);\n var w18 = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;\n c = (((hi + (mid >>> 13)) | 0) + (w18 >>> 26)) | 0;\n w18 &= 0x3ffffff;\n o[0] = w0;\n o[1] = w1;\n o[2] = w2;\n o[3] = w3;\n o[4] = w4;\n o[5] = w5;\n o[6] = w6;\n o[7] = w7;\n o[8] = w8;\n o[9] = w9;\n o[10] = w10;\n o[11] = w11;\n o[12] = w12;\n o[13] = w13;\n o[14] = w14;\n o[15] = w15;\n o[16] = w16;\n o[17] = w17;\n o[18] = w18;\n if (c !== 0) {\n o[19] = c;\n out.length++;\n }\n return out;\n };\n\n // Polyfill comb\n if (!Math.imul) {\n comb10MulTo = smallMulTo;\n }\n\n function bigMulTo (self, num, out) {\n out.negative = num.negative ^ self.negative;\n out.length = self.length + num.length;\n\n var carry = 0;\n var hncarry = 0;\n for (var k = 0; k < out.length - 1; k++) {\n // Sum all words with the same `i + j = k` and accumulate `ncarry`,\n // note that ncarry could be >= 0x3ffffff\n var ncarry = hncarry;\n hncarry = 0;\n var rword = carry & 0x3ffffff;\n var maxJ = Math.min(k, num.length - 1);\n for (var j = Math.max(0, k - self.length + 1); j <= maxJ; j++) {\n var i = k - j;\n var a = self.words[i] | 0;\n var b = num.words[j] | 0;\n var r = a * b;\n\n var lo = r & 0x3ffffff;\n ncarry = (ncarry + ((r / 0x4000000) | 0)) | 0;\n lo = (lo + rword) | 0;\n rword = lo & 0x3ffffff;\n ncarry = (ncarry + (lo >>> 26)) | 0;\n\n hncarry += ncarry >>> 26;\n ncarry &= 0x3ffffff;\n }\n out.words[k] = rword;\n carry = ncarry;\n ncarry = hncarry;\n }\n if (carry !== 0) {\n out.words[k] = carry;\n } else {\n out.length--;\n }\n\n return out._strip();\n }\n\n function jumboMulTo (self, num, out) {\n // Temporary disable, see https://github.com/indutny/bn.js/issues/211\n // var fftm = new FFTM();\n // return fftm.mulp(self, num, out);\n return bigMulTo(self, num, out);\n }\n\n BN.prototype.mulTo = function mulTo (num, out) {\n var res;\n var len = this.length + num.length;\n if (this.length === 10 && num.length === 10) {\n res = comb10MulTo(this, num, out);\n } else if (len < 63) {\n res = smallMulTo(this, num, out);\n } else if (len < 1024) {\n res = bigMulTo(this, num, out);\n } else {\n res = jumboMulTo(this, num, out);\n }\n\n return res;\n };\n\n // Cooley-Tukey algorithm for FFT\n // slightly revisited to rely on looping instead of recursion\n\n function FFTM (x, y) {\n this.x = x;\n this.y = y;\n }\n\n FFTM.prototype.makeRBT = function makeRBT (N) {\n var t = new Array(N);\n var l = BN.prototype._countBits(N) - 1;\n for (var i = 0; i < N; i++) {\n t[i] = this.revBin(i, l, N);\n }\n\n return t;\n };\n\n // Returns binary-reversed representation of `x`\n FFTM.prototype.revBin = function revBin (x, l, N) {\n if (x === 0 || x === N - 1) return x;\n\n var rb = 0;\n for (var i = 0; i < l; i++) {\n rb |= (x & 1) << (l - i - 1);\n x >>= 1;\n }\n\n return rb;\n };\n\n // Performs \"tweedling\" phase, therefore 'emulating'\n // behaviour of the recursive algorithm\n FFTM.prototype.permute = function permute (rbt, rws, iws, rtws, itws, N) {\n for (var i = 0; i < N; i++) {\n rtws[i] = rws[rbt[i]];\n itws[i] = iws[rbt[i]];\n }\n };\n\n FFTM.prototype.transform = function transform (rws, iws, rtws, itws, N, rbt) {\n this.permute(rbt, rws, iws, rtws, itws, N);\n\n for (var s = 1; s < N; s <<= 1) {\n var l = s << 1;\n\n var rtwdf = Math.cos(2 * Math.PI / l);\n var itwdf = Math.sin(2 * Math.PI / l);\n\n for (var p = 0; p < N; p += l) {\n var rtwdf_ = rtwdf;\n var itwdf_ = itwdf;\n\n for (var j = 0; j < s; j++) {\n var re = rtws[p + j];\n var ie = itws[p + j];\n\n var ro = rtws[p + j + s];\n var io = itws[p + j + s];\n\n var rx = rtwdf_ * ro - itwdf_ * io;\n\n io = rtwdf_ * io + itwdf_ * ro;\n ro = rx;\n\n rtws[p + j] = re + ro;\n itws[p + j] = ie + io;\n\n rtws[p + j + s] = re - ro;\n itws[p + j + s] = ie - io;\n\n /* jshint maxdepth : false */\n if (j !== l) {\n rx = rtwdf * rtwdf_ - itwdf * itwdf_;\n\n itwdf_ = rtwdf * itwdf_ + itwdf * rtwdf_;\n rtwdf_ = rx;\n }\n }\n }\n }\n };\n\n FFTM.prototype.guessLen13b = function guessLen13b (n, m) {\n var N = Math.max(m, n) | 1;\n var odd = N & 1;\n var i = 0;\n for (N = N / 2 | 0; N; N = N >>> 1) {\n i++;\n }\n\n return 1 << i + 1 + odd;\n };\n\n FFTM.prototype.conjugate = function conjugate (rws, iws, N) {\n if (N <= 1) return;\n\n for (var i = 0; i < N / 2; i++) {\n var t = rws[i];\n\n rws[i] = rws[N - i - 1];\n rws[N - i - 1] = t;\n\n t = iws[i];\n\n iws[i] = -iws[N - i - 1];\n iws[N - i - 1] = -t;\n }\n };\n\n FFTM.prototype.normalize13b = function normalize13b (ws, N) {\n var carry = 0;\n for (var i = 0; i < N / 2; i++) {\n var w = Math.round(ws[2 * i + 1] / N) * 0x2000 +\n Math.round(ws[2 * i] / N) +\n carry;\n\n ws[i] = w & 0x3ffffff;\n\n if (w < 0x4000000) {\n carry = 0;\n } else {\n carry = w / 0x4000000 | 0;\n }\n }\n\n return ws;\n };\n\n FFTM.prototype.convert13b = function convert13b (ws, len, rws, N) {\n var carry = 0;\n for (var i = 0; i < len; i++) {\n carry = carry + (ws[i] | 0);\n\n rws[2 * i] = carry & 0x1fff; carry = carry >>> 13;\n rws[2 * i + 1] = carry & 0x1fff; carry = carry >>> 13;\n }\n\n // Pad with zeroes\n for (i = 2 * len; i < N; ++i) {\n rws[i] = 0;\n }\n\n assert(carry === 0);\n assert((carry & ~0x1fff) === 0);\n };\n\n FFTM.prototype.stub = function stub (N) {\n var ph = new Array(N);\n for (var i = 0; i < N; i++) {\n ph[i] = 0;\n }\n\n return ph;\n };\n\n FFTM.prototype.mulp = function mulp (x, y, out) {\n var N = 2 * this.guessLen13b(x.length, y.length);\n\n var rbt = this.makeRBT(N);\n\n var _ = this.stub(N);\n\n var rws = new Array(N);\n var rwst = new Array(N);\n var iwst = new Array(N);\n\n var nrws = new Array(N);\n var nrwst = new Array(N);\n var niwst = new Array(N);\n\n var rmws = out.words;\n rmws.length = N;\n\n this.convert13b(x.words, x.length, rws, N);\n this.convert13b(y.words, y.length, nrws, N);\n\n this.transform(rws, _, rwst, iwst, N, rbt);\n this.transform(nrws, _, nrwst, niwst, N, rbt);\n\n for (var i = 0; i < N; i++) {\n var rx = rwst[i] * nrwst[i] - iwst[i] * niwst[i];\n iwst[i] = rwst[i] * niwst[i] + iwst[i] * nrwst[i];\n rwst[i] = rx;\n }\n\n this.conjugate(rwst, iwst, N);\n this.transform(rwst, iwst, rmws, _, N, rbt);\n this.conjugate(rmws, _, N);\n this.normalize13b(rmws, N);\n\n out.negative = x.negative ^ y.negative;\n out.length = x.length + y.length;\n return out._strip();\n };\n\n // Multiply `this` by `num`\n BN.prototype.mul = function mul (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return this.mulTo(num, out);\n };\n\n // Multiply employing FFT\n BN.prototype.mulf = function mulf (num) {\n var out = new BN(null);\n out.words = new Array(this.length + num.length);\n return jumboMulTo(this, num, out);\n };\n\n // In-place Multiplication\n BN.prototype.imul = function imul (num) {\n return this.clone().mulTo(num, this);\n };\n\n BN.prototype.imuln = function imuln (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n\n // Carry\n var carry = 0;\n for (var i = 0; i < this.length; i++) {\n var w = (this.words[i] | 0) * num;\n var lo = (w & 0x3ffffff) + (carry & 0x3ffffff);\n carry >>= 26;\n carry += (w / 0x4000000) | 0;\n // NOTE: lo is 27bit maximum\n carry += lo >>> 26;\n this.words[i] = lo & 0x3ffffff;\n }\n\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.muln = function muln (num) {\n return this.clone().imuln(num);\n };\n\n // `this` * `this`\n BN.prototype.sqr = function sqr () {\n return this.mul(this);\n };\n\n // `this` * `this` in-place\n BN.prototype.isqr = function isqr () {\n return this.imul(this.clone());\n };\n\n // Math.pow(`this`, `num`)\n BN.prototype.pow = function pow (num) {\n var w = toBitArray(num);\n if (w.length === 0) return new BN(1);\n\n // Skip leading zeroes\n var res = this;\n for (var i = 0; i < w.length; i++, res = res.sqr()) {\n if (w[i] !== 0) break;\n }\n\n if (++i < w.length) {\n for (var q = res.sqr(); i < w.length; i++, q = q.sqr()) {\n if (w[i] === 0) continue;\n\n res = res.mul(q);\n }\n }\n\n return res;\n };\n\n // Shift-left in-place\n BN.prototype.iushln = function iushln (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n var carryMask = (0x3ffffff >>> (26 - r)) << (26 - r);\n var i;\n\n if (r !== 0) {\n var carry = 0;\n\n for (i = 0; i < this.length; i++) {\n var newCarry = this.words[i] & carryMask;\n var c = ((this.words[i] | 0) - newCarry) << r;\n this.words[i] = c | carry;\n carry = newCarry >>> (26 - r);\n }\n\n if (carry) {\n this.words[i] = carry;\n this.length++;\n }\n }\n\n if (s !== 0) {\n for (i = this.length - 1; i >= 0; i--) {\n this.words[i + s] = this.words[i];\n }\n\n for (i = 0; i < s; i++) {\n this.words[i] = 0;\n }\n\n this.length += s;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishln = function ishln (bits) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushln(bits);\n };\n\n // Shift-right in-place\n // NOTE: `hint` is a lowest bit before trailing zeroes\n // NOTE: if `extended` is present - it will be filled with destroyed bits\n BN.prototype.iushrn = function iushrn (bits, hint, extended) {\n assert(typeof bits === 'number' && bits >= 0);\n var h;\n if (hint) {\n h = (hint - (hint % 26)) / 26;\n } else {\n h = 0;\n }\n\n var r = bits % 26;\n var s = Math.min((bits - r) / 26, this.length);\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n var maskedWords = extended;\n\n h -= s;\n h = Math.max(0, h);\n\n // Extended mode, copy masked part\n if (maskedWords) {\n for (var i = 0; i < s; i++) {\n maskedWords.words[i] = this.words[i];\n }\n maskedWords.length = s;\n }\n\n if (s === 0) {\n // No-op, we should not move anything at all\n } else if (this.length > s) {\n this.length -= s;\n for (i = 0; i < this.length; i++) {\n this.words[i] = this.words[i + s];\n }\n } else {\n this.words[0] = 0;\n this.length = 1;\n }\n\n var carry = 0;\n for (i = this.length - 1; i >= 0 && (carry !== 0 || i >= h); i--) {\n var word = this.words[i] | 0;\n this.words[i] = (carry << (26 - r)) | (word >>> r);\n carry = word & mask;\n }\n\n // Push carried bits as a mask\n if (maskedWords && carry !== 0) {\n maskedWords.words[maskedWords.length++] = carry;\n }\n\n if (this.length === 0) {\n this.words[0] = 0;\n this.length = 1;\n }\n\n return this._strip();\n };\n\n BN.prototype.ishrn = function ishrn (bits, hint, extended) {\n // TODO(indutny): implement me\n assert(this.negative === 0);\n return this.iushrn(bits, hint, extended);\n };\n\n // Shift-left\n BN.prototype.shln = function shln (bits) {\n return this.clone().ishln(bits);\n };\n\n BN.prototype.ushln = function ushln (bits) {\n return this.clone().iushln(bits);\n };\n\n // Shift-right\n BN.prototype.shrn = function shrn (bits) {\n return this.clone().ishrn(bits);\n };\n\n BN.prototype.ushrn = function ushrn (bits) {\n return this.clone().iushrn(bits);\n };\n\n // Test if n bit is set\n BN.prototype.testn = function testn (bit) {\n assert(typeof bit === 'number' && bit >= 0);\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) return false;\n\n // Check bit and return\n var w = this.words[s];\n\n return !!(w & q);\n };\n\n // Return only lowers bits of number (in-place)\n BN.prototype.imaskn = function imaskn (bits) {\n assert(typeof bits === 'number' && bits >= 0);\n var r = bits % 26;\n var s = (bits - r) / 26;\n\n assert(this.negative === 0, 'imaskn works only with positive numbers');\n\n if (this.length <= s) {\n return this;\n }\n\n if (r !== 0) {\n s++;\n }\n this.length = Math.min(s, this.length);\n\n if (r !== 0) {\n var mask = 0x3ffffff ^ ((0x3ffffff >>> r) << r);\n this.words[this.length - 1] &= mask;\n }\n\n return this._strip();\n };\n\n // Return only lowers bits of number\n BN.prototype.maskn = function maskn (bits) {\n return this.clone().imaskn(bits);\n };\n\n // Add plain number `num` to `this`\n BN.prototype.iaddn = function iaddn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.isubn(-num);\n\n // Possible sign change\n if (this.negative !== 0) {\n if (this.length === 1 && (this.words[0] | 0) <= num) {\n this.words[0] = num - (this.words[0] | 0);\n this.negative = 0;\n return this;\n }\n\n this.negative = 0;\n this.isubn(num);\n this.negative = 1;\n return this;\n }\n\n // Add without checks\n return this._iaddn(num);\n };\n\n BN.prototype._iaddn = function _iaddn (num) {\n this.words[0] += num;\n\n // Carry\n for (var i = 0; i < this.length && this.words[i] >= 0x4000000; i++) {\n this.words[i] -= 0x4000000;\n if (i === this.length - 1) {\n this.words[i + 1] = 1;\n } else {\n this.words[i + 1]++;\n }\n }\n this.length = Math.max(this.length, i + 1);\n\n return this;\n };\n\n // Subtract plain number `num` from `this`\n BN.prototype.isubn = function isubn (num) {\n assert(typeof num === 'number');\n assert(num < 0x4000000);\n if (num < 0) return this.iaddn(-num);\n\n if (this.negative !== 0) {\n this.negative = 0;\n this.iaddn(num);\n this.negative = 1;\n return this;\n }\n\n this.words[0] -= num;\n\n if (this.length === 1 && this.words[0] < 0) {\n this.words[0] = -this.words[0];\n this.negative = 1;\n } else {\n // Carry\n for (var i = 0; i < this.length && this.words[i] < 0; i++) {\n this.words[i] += 0x4000000;\n this.words[i + 1] -= 1;\n }\n }\n\n return this._strip();\n };\n\n BN.prototype.addn = function addn (num) {\n return this.clone().iaddn(num);\n };\n\n BN.prototype.subn = function subn (num) {\n return this.clone().isubn(num);\n };\n\n BN.prototype.iabs = function iabs () {\n this.negative = 0;\n\n return this;\n };\n\n BN.prototype.abs = function abs () {\n return this.clone().iabs();\n };\n\n BN.prototype._ishlnsubmul = function _ishlnsubmul (num, mul, shift) {\n var len = num.length + shift;\n var i;\n\n this._expand(len);\n\n var w;\n var carry = 0;\n for (i = 0; i < num.length; i++) {\n w = (this.words[i + shift] | 0) + carry;\n var right = (num.words[i] | 0) * mul;\n w -= right & 0x3ffffff;\n carry = (w >> 26) - ((right / 0x4000000) | 0);\n this.words[i + shift] = w & 0x3ffffff;\n }\n for (; i < this.length - shift; i++) {\n w = (this.words[i + shift] | 0) + carry;\n carry = w >> 26;\n this.words[i + shift] = w & 0x3ffffff;\n }\n\n if (carry === 0) return this._strip();\n\n // Subtraction overflow\n assert(carry === -1);\n carry = 0;\n for (i = 0; i < this.length; i++) {\n w = -(this.words[i] | 0) + carry;\n carry = w >> 26;\n this.words[i] = w & 0x3ffffff;\n }\n this.negative = 1;\n\n return this._strip();\n };\n\n BN.prototype._wordDiv = function _wordDiv (num, mode) {\n var shift = this.length - num.length;\n\n var a = this.clone();\n var b = num;\n\n // Normalize\n var bhi = b.words[b.length - 1] | 0;\n var bhiBits = this._countBits(bhi);\n shift = 26 - bhiBits;\n if (shift !== 0) {\n b = b.ushln(shift);\n a.iushln(shift);\n bhi = b.words[b.length - 1] | 0;\n }\n\n // Initialize quotient\n var m = a.length - b.length;\n var q;\n\n if (mode !== 'mod') {\n q = new BN(null);\n q.length = m + 1;\n q.words = new Array(q.length);\n for (var i = 0; i < q.length; i++) {\n q.words[i] = 0;\n }\n }\n\n var diff = a.clone()._ishlnsubmul(b, 1, m);\n if (diff.negative === 0) {\n a = diff;\n if (q) {\n q.words[m] = 1;\n }\n }\n\n for (var j = m - 1; j >= 0; j--) {\n var qj = (a.words[b.length + j] | 0) * 0x4000000 +\n (a.words[b.length + j - 1] | 0);\n\n // NOTE: (qj / bhi) is (0x3ffffff * 0x4000000 + 0x3ffffff) / 0x2000000 max\n // (0x7ffffff)\n qj = Math.min((qj / bhi) | 0, 0x3ffffff);\n\n a._ishlnsubmul(b, qj, j);\n while (a.negative !== 0) {\n qj--;\n a.negative = 0;\n a._ishlnsubmul(b, 1, j);\n if (!a.isZero()) {\n a.negative ^= 1;\n }\n }\n if (q) {\n q.words[j] = qj;\n }\n }\n if (q) {\n q._strip();\n }\n a._strip();\n\n // Denormalize\n if (mode !== 'div' && shift !== 0) {\n a.iushrn(shift);\n }\n\n return {\n div: q || null,\n mod: a\n };\n };\n\n // NOTE: 1) `mode` can be set to `mod` to request mod only,\n // to `div` to request div only, or be absent to\n // request both div & mod\n // 2) `positive` is true if unsigned mod is requested\n BN.prototype.divmod = function divmod (num, mode, positive) {\n assert(!num.isZero());\n\n if (this.isZero()) {\n return {\n div: new BN(0),\n mod: new BN(0)\n };\n }\n\n var div, mod, res;\n if (this.negative !== 0 && num.negative === 0) {\n res = this.neg().divmod(num, mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.iadd(num);\n }\n }\n\n return {\n div: div,\n mod: mod\n };\n }\n\n if (this.negative === 0 && num.negative !== 0) {\n res = this.divmod(num.neg(), mode);\n\n if (mode !== 'mod') {\n div = res.div.neg();\n }\n\n return {\n div: div,\n mod: res.mod\n };\n }\n\n if ((this.negative & num.negative) !== 0) {\n res = this.neg().divmod(num.neg(), mode);\n\n if (mode !== 'div') {\n mod = res.mod.neg();\n if (positive && mod.negative !== 0) {\n mod.isub(num);\n }\n }\n\n return {\n div: res.div,\n mod: mod\n };\n }\n\n // Both numbers are positive at this point\n\n // Strip both numbers to approximate shift value\n if (num.length > this.length || this.cmp(num) < 0) {\n return {\n div: new BN(0),\n mod: this\n };\n }\n\n // Very short reduction\n if (num.length === 1) {\n if (mode === 'div') {\n return {\n div: this.divn(num.words[0]),\n mod: null\n };\n }\n\n if (mode === 'mod') {\n return {\n div: null,\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return {\n div: this.divn(num.words[0]),\n mod: new BN(this.modrn(num.words[0]))\n };\n }\n\n return this._wordDiv(num, mode);\n };\n\n // Find `this` / `num`\n BN.prototype.div = function div (num) {\n return this.divmod(num, 'div', false).div;\n };\n\n // Find `this` % `num`\n BN.prototype.mod = function mod (num) {\n return this.divmod(num, 'mod', false).mod;\n };\n\n BN.prototype.umod = function umod (num) {\n return this.divmod(num, 'mod', true).mod;\n };\n\n // Find Round(`this` / `num`)\n BN.prototype.divRound = function divRound (num) {\n var dm = this.divmod(num);\n\n // Fast case - exact division\n if (dm.mod.isZero()) return dm.div;\n\n var mod = dm.div.negative !== 0 ? dm.mod.isub(num) : dm.mod;\n\n var half = num.ushrn(1);\n var r2 = num.andln(1);\n var cmp = mod.cmp(half);\n\n // Round down\n if (cmp < 0 || (r2 === 1 && cmp === 0)) return dm.div;\n\n // Round up\n return dm.div.negative !== 0 ? dm.div.isubn(1) : dm.div.iaddn(1);\n };\n\n BN.prototype.modrn = function modrn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n var p = (1 << 26) % num;\n\n var acc = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n acc = (p * acc + (this.words[i] | 0)) % num;\n }\n\n return isNegNum ? -acc : acc;\n };\n\n // WARNING: DEPRECATED\n BN.prototype.modn = function modn (num) {\n return this.modrn(num);\n };\n\n // In-place division by number\n BN.prototype.idivn = function idivn (num) {\n var isNegNum = num < 0;\n if (isNegNum) num = -num;\n\n assert(num <= 0x3ffffff);\n\n var carry = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var w = (this.words[i] | 0) + carry * 0x4000000;\n this.words[i] = (w / num) | 0;\n carry = w % num;\n }\n\n this._strip();\n return isNegNum ? this.ineg() : this;\n };\n\n BN.prototype.divn = function divn (num) {\n return this.clone().idivn(num);\n };\n\n BN.prototype.egcd = function egcd (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var x = this;\n var y = p.clone();\n\n if (x.negative !== 0) {\n x = x.umod(p);\n } else {\n x = x.clone();\n }\n\n // A * x + B * y = x\n var A = new BN(1);\n var B = new BN(0);\n\n // C * x + D * y = y\n var C = new BN(0);\n var D = new BN(1);\n\n var g = 0;\n\n while (x.isEven() && y.isEven()) {\n x.iushrn(1);\n y.iushrn(1);\n ++g;\n }\n\n var yp = y.clone();\n var xp = x.clone();\n\n while (!x.isZero()) {\n for (var i = 0, im = 1; (x.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n x.iushrn(i);\n while (i-- > 0) {\n if (A.isOdd() || B.isOdd()) {\n A.iadd(yp);\n B.isub(xp);\n }\n\n A.iushrn(1);\n B.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (y.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n y.iushrn(j);\n while (j-- > 0) {\n if (C.isOdd() || D.isOdd()) {\n C.iadd(yp);\n D.isub(xp);\n }\n\n C.iushrn(1);\n D.iushrn(1);\n }\n }\n\n if (x.cmp(y) >= 0) {\n x.isub(y);\n A.isub(C);\n B.isub(D);\n } else {\n y.isub(x);\n C.isub(A);\n D.isub(B);\n }\n }\n\n return {\n a: C,\n b: D,\n gcd: y.iushln(g)\n };\n };\n\n // This is reduced incarnation of the binary EEA\n // above, designated to invert members of the\n // _prime_ fields F(p) at a maximal speed\n BN.prototype._invmp = function _invmp (p) {\n assert(p.negative === 0);\n assert(!p.isZero());\n\n var a = this;\n var b = p.clone();\n\n if (a.negative !== 0) {\n a = a.umod(p);\n } else {\n a = a.clone();\n }\n\n var x1 = new BN(1);\n var x2 = new BN(0);\n\n var delta = b.clone();\n\n while (a.cmpn(1) > 0 && b.cmpn(1) > 0) {\n for (var i = 0, im = 1; (a.words[0] & im) === 0 && i < 26; ++i, im <<= 1);\n if (i > 0) {\n a.iushrn(i);\n while (i-- > 0) {\n if (x1.isOdd()) {\n x1.iadd(delta);\n }\n\n x1.iushrn(1);\n }\n }\n\n for (var j = 0, jm = 1; (b.words[0] & jm) === 0 && j < 26; ++j, jm <<= 1);\n if (j > 0) {\n b.iushrn(j);\n while (j-- > 0) {\n if (x2.isOdd()) {\n x2.iadd(delta);\n }\n\n x2.iushrn(1);\n }\n }\n\n if (a.cmp(b) >= 0) {\n a.isub(b);\n x1.isub(x2);\n } else {\n b.isub(a);\n x2.isub(x1);\n }\n }\n\n var res;\n if (a.cmpn(1) === 0) {\n res = x1;\n } else {\n res = x2;\n }\n\n if (res.cmpn(0) < 0) {\n res.iadd(p);\n }\n\n return res;\n };\n\n BN.prototype.gcd = function gcd (num) {\n if (this.isZero()) return num.abs();\n if (num.isZero()) return this.abs();\n\n var a = this.clone();\n var b = num.clone();\n a.negative = 0;\n b.negative = 0;\n\n // Remove common factor of two\n for (var shift = 0; a.isEven() && b.isEven(); shift++) {\n a.iushrn(1);\n b.iushrn(1);\n }\n\n do {\n while (a.isEven()) {\n a.iushrn(1);\n }\n while (b.isEven()) {\n b.iushrn(1);\n }\n\n var r = a.cmp(b);\n if (r < 0) {\n // Swap `a` and `b` to make `a` always bigger than `b`\n var t = a;\n a = b;\n b = t;\n } else if (r === 0 || b.cmpn(1) === 0) {\n break;\n }\n\n a.isub(b);\n } while (true);\n\n return b.iushln(shift);\n };\n\n // Invert number in the field F(num)\n BN.prototype.invm = function invm (num) {\n return this.egcd(num).a.umod(num);\n };\n\n BN.prototype.isEven = function isEven () {\n return (this.words[0] & 1) === 0;\n };\n\n BN.prototype.isOdd = function isOdd () {\n return (this.words[0] & 1) === 1;\n };\n\n // And first word and num\n BN.prototype.andln = function andln (num) {\n return this.words[0] & num;\n };\n\n // Increment at the bit position in-line\n BN.prototype.bincn = function bincn (bit) {\n assert(typeof bit === 'number');\n var r = bit % 26;\n var s = (bit - r) / 26;\n var q = 1 << r;\n\n // Fast case: bit is much higher than all existing words\n if (this.length <= s) {\n this._expand(s + 1);\n this.words[s] |= q;\n return this;\n }\n\n // Add bit and propagate, if needed\n var carry = q;\n for (var i = s; carry !== 0 && i < this.length; i++) {\n var w = this.words[i] | 0;\n w += carry;\n carry = w >>> 26;\n w &= 0x3ffffff;\n this.words[i] = w;\n }\n if (carry !== 0) {\n this.words[i] = carry;\n this.length++;\n }\n return this;\n };\n\n BN.prototype.isZero = function isZero () {\n return this.length === 1 && this.words[0] === 0;\n };\n\n BN.prototype.cmpn = function cmpn (num) {\n var negative = num < 0;\n\n if (this.negative !== 0 && !negative) return -1;\n if (this.negative === 0 && negative) return 1;\n\n this._strip();\n\n var res;\n if (this.length > 1) {\n res = 1;\n } else {\n if (negative) {\n num = -num;\n }\n\n assert(num <= 0x3ffffff, 'Number is too big');\n\n var w = this.words[0] | 0;\n res = w === num ? 0 : w < num ? -1 : 1;\n }\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Compare two numbers and return:\n // 1 - if `this` > `num`\n // 0 - if `this` == `num`\n // -1 - if `this` < `num`\n BN.prototype.cmp = function cmp (num) {\n if (this.negative !== 0 && num.negative === 0) return -1;\n if (this.negative === 0 && num.negative !== 0) return 1;\n\n var res = this.ucmp(num);\n if (this.negative !== 0) return -res | 0;\n return res;\n };\n\n // Unsigned comparison\n BN.prototype.ucmp = function ucmp (num) {\n // At this point both numbers have the same sign\n if (this.length > num.length) return 1;\n if (this.length < num.length) return -1;\n\n var res = 0;\n for (var i = this.length - 1; i >= 0; i--) {\n var a = this.words[i] | 0;\n var b = num.words[i] | 0;\n\n if (a === b) continue;\n if (a < b) {\n res = -1;\n } else if (a > b) {\n res = 1;\n }\n break;\n }\n return res;\n };\n\n BN.prototype.gtn = function gtn (num) {\n return this.cmpn(num) === 1;\n };\n\n BN.prototype.gt = function gt (num) {\n return this.cmp(num) === 1;\n };\n\n BN.prototype.gten = function gten (num) {\n return this.cmpn(num) >= 0;\n };\n\n BN.prototype.gte = function gte (num) {\n return this.cmp(num) >= 0;\n };\n\n BN.prototype.ltn = function ltn (num) {\n return this.cmpn(num) === -1;\n };\n\n BN.prototype.lt = function lt (num) {\n return this.cmp(num) === -1;\n };\n\n BN.prototype.lten = function lten (num) {\n return this.cmpn(num) <= 0;\n };\n\n BN.prototype.lte = function lte (num) {\n return this.cmp(num) <= 0;\n };\n\n BN.prototype.eqn = function eqn (num) {\n return this.cmpn(num) === 0;\n };\n\n BN.prototype.eq = function eq (num) {\n return this.cmp(num) === 0;\n };\n\n //\n // A reduce context, could be using montgomery or something better, depending\n // on the `m` itself.\n //\n BN.red = function red (num) {\n return new Red(num);\n };\n\n BN.prototype.toRed = function toRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n assert(this.negative === 0, 'red works only with positives');\n return ctx.convertTo(this)._forceRed(ctx);\n };\n\n BN.prototype.fromRed = function fromRed () {\n assert(this.red, 'fromRed works only with numbers in reduction context');\n return this.red.convertFrom(this);\n };\n\n BN.prototype._forceRed = function _forceRed (ctx) {\n this.red = ctx;\n return this;\n };\n\n BN.prototype.forceRed = function forceRed (ctx) {\n assert(!this.red, 'Already a number in reduction context');\n return this._forceRed(ctx);\n };\n\n BN.prototype.redAdd = function redAdd (num) {\n assert(this.red, 'redAdd works only with red numbers');\n return this.red.add(this, num);\n };\n\n BN.prototype.redIAdd = function redIAdd (num) {\n assert(this.red, 'redIAdd works only with red numbers');\n return this.red.iadd(this, num);\n };\n\n BN.prototype.redSub = function redSub (num) {\n assert(this.red, 'redSub works only with red numbers');\n return this.red.sub(this, num);\n };\n\n BN.prototype.redISub = function redISub (num) {\n assert(this.red, 'redISub works only with red numbers');\n return this.red.isub(this, num);\n };\n\n BN.prototype.redShl = function redShl (num) {\n assert(this.red, 'redShl works only with red numbers');\n return this.red.shl(this, num);\n };\n\n BN.prototype.redMul = function redMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.mul(this, num);\n };\n\n BN.prototype.redIMul = function redIMul (num) {\n assert(this.red, 'redMul works only with red numbers');\n this.red._verify2(this, num);\n return this.red.imul(this, num);\n };\n\n BN.prototype.redSqr = function redSqr () {\n assert(this.red, 'redSqr works only with red numbers');\n this.red._verify1(this);\n return this.red.sqr(this);\n };\n\n BN.prototype.redISqr = function redISqr () {\n assert(this.red, 'redISqr works only with red numbers');\n this.red._verify1(this);\n return this.red.isqr(this);\n };\n\n // Square root over p\n BN.prototype.redSqrt = function redSqrt () {\n assert(this.red, 'redSqrt works only with red numbers');\n this.red._verify1(this);\n return this.red.sqrt(this);\n };\n\n BN.prototype.redInvm = function redInvm () {\n assert(this.red, 'redInvm works only with red numbers');\n this.red._verify1(this);\n return this.red.invm(this);\n };\n\n // Return negative clone of `this` % `red modulo`\n BN.prototype.redNeg = function redNeg () {\n assert(this.red, 'redNeg works only with red numbers');\n this.red._verify1(this);\n return this.red.neg(this);\n };\n\n BN.prototype.redPow = function redPow (num) {\n assert(this.red && !num.red, 'redPow(normalNum)');\n this.red._verify1(this);\n return this.red.pow(this, num);\n };\n\n // Prime numbers with efficient reduction\n var primes = {\n k256: null,\n p224: null,\n p192: null,\n p25519: null\n };\n\n // Pseudo-Mersenne prime\n function MPrime (name, p) {\n // P = 2 ^ N - K\n this.name = name;\n this.p = new BN(p, 16);\n this.n = this.p.bitLength();\n this.k = new BN(1).iushln(this.n).isub(this.p);\n\n this.tmp = this._tmp();\n }\n\n MPrime.prototype._tmp = function _tmp () {\n var tmp = new BN(null);\n tmp.words = new Array(Math.ceil(this.n / 13));\n return tmp;\n };\n\n MPrime.prototype.ireduce = function ireduce (num) {\n // Assumes that `num` is less than `P^2`\n // num = HI * (2 ^ N - K) + HI * K + LO = HI * K + LO (mod P)\n var r = num;\n var rlen;\n\n do {\n this.split(r, this.tmp);\n r = this.imulK(r);\n r = r.iadd(this.tmp);\n rlen = r.bitLength();\n } while (rlen > this.n);\n\n var cmp = rlen < this.n ? -1 : r.ucmp(this.p);\n if (cmp === 0) {\n r.words[0] = 0;\n r.length = 1;\n } else if (cmp > 0) {\n r.isub(this.p);\n } else {\n if (r.strip !== undefined) {\n // r is a BN v4 instance\n r.strip();\n } else {\n // r is a BN v5 instance\n r._strip();\n }\n }\n\n return r;\n };\n\n MPrime.prototype.split = function split (input, out) {\n input.iushrn(this.n, 0, out);\n };\n\n MPrime.prototype.imulK = function imulK (num) {\n return num.imul(this.k);\n };\n\n function K256 () {\n MPrime.call(\n this,\n 'k256',\n 'ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f');\n }\n inherits(K256, MPrime);\n\n K256.prototype.split = function split (input, output) {\n // 256 = 9 * 26 + 22\n var mask = 0x3fffff;\n\n var outLen = Math.min(input.length, 9);\n for (var i = 0; i < outLen; i++) {\n output.words[i] = input.words[i];\n }\n output.length = outLen;\n\n if (input.length <= 9) {\n input.words[0] = 0;\n input.length = 1;\n return;\n }\n\n // Shift by 9 limbs\n var prev = input.words[9];\n output.words[output.length++] = prev & mask;\n\n for (i = 10; i < input.length; i++) {\n var next = input.words[i] | 0;\n input.words[i - 10] = ((next & mask) << 4) | (prev >>> 22);\n prev = next;\n }\n prev >>>= 22;\n input.words[i - 10] = prev;\n if (prev === 0 && input.length > 10) {\n input.length -= 10;\n } else {\n input.length -= 9;\n }\n };\n\n K256.prototype.imulK = function imulK (num) {\n // K = 0x1000003d1 = [ 0x40, 0x3d1 ]\n num.words[num.length] = 0;\n num.words[num.length + 1] = 0;\n num.length += 2;\n\n // bounded at: 0x40 * 0x3ffffff + 0x3d0 = 0x100000390\n var lo = 0;\n for (var i = 0; i < num.length; i++) {\n var w = num.words[i] | 0;\n lo += w * 0x3d1;\n num.words[i] = lo & 0x3ffffff;\n lo = w * 0x40 + ((lo / 0x4000000) | 0);\n }\n\n // Fast length reduction\n if (num.words[num.length - 1] === 0) {\n num.length--;\n if (num.words[num.length - 1] === 0) {\n num.length--;\n }\n }\n return num;\n };\n\n function P224 () {\n MPrime.call(\n this,\n 'p224',\n 'ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001');\n }\n inherits(P224, MPrime);\n\n function P192 () {\n MPrime.call(\n this,\n 'p192',\n 'ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff');\n }\n inherits(P192, MPrime);\n\n function P25519 () {\n // 2 ^ 255 - 19\n MPrime.call(\n this,\n '25519',\n '7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed');\n }\n inherits(P25519, MPrime);\n\n P25519.prototype.imulK = function imulK (num) {\n // K = 0x13\n var carry = 0;\n for (var i = 0; i < num.length; i++) {\n var hi = (num.words[i] | 0) * 0x13 + carry;\n var lo = hi & 0x3ffffff;\n hi >>>= 26;\n\n num.words[i] = lo;\n carry = hi;\n }\n if (carry !== 0) {\n num.words[num.length++] = carry;\n }\n return num;\n };\n\n // Exported mostly for testing purposes, use plain name instead\n BN._prime = function prime (name) {\n // Cached version of prime\n if (primes[name]) return primes[name];\n\n var prime;\n if (name === 'k256') {\n prime = new K256();\n } else if (name === 'p224') {\n prime = new P224();\n } else if (name === 'p192') {\n prime = new P192();\n } else if (name === 'p25519') {\n prime = new P25519();\n } else {\n throw new Error('Unknown prime ' + name);\n }\n primes[name] = prime;\n\n return prime;\n };\n\n //\n // Base reduction engine\n //\n function Red (m) {\n if (typeof m === 'string') {\n var prime = BN._prime(m);\n this.m = prime.p;\n this.prime = prime;\n } else {\n assert(m.gtn(1), 'modulus must be greater than 1');\n this.m = m;\n this.prime = null;\n }\n }\n\n Red.prototype._verify1 = function _verify1 (a) {\n assert(a.negative === 0, 'red works only with positives');\n assert(a.red, 'red works only with red numbers');\n };\n\n Red.prototype._verify2 = function _verify2 (a, b) {\n assert((a.negative | b.negative) === 0, 'red works only with positives');\n assert(a.red && a.red === b.red,\n 'red works only with red numbers');\n };\n\n Red.prototype.imod = function imod (a) {\n if (this.prime) return this.prime.ireduce(a)._forceRed(this);\n\n move(a, a.umod(this.m)._forceRed(this));\n return a;\n };\n\n Red.prototype.neg = function neg (a) {\n if (a.isZero()) {\n return a.clone();\n }\n\n return this.m.sub(a)._forceRed(this);\n };\n\n Red.prototype.add = function add (a, b) {\n this._verify2(a, b);\n\n var res = a.add(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.iadd = function iadd (a, b) {\n this._verify2(a, b);\n\n var res = a.iadd(b);\n if (res.cmp(this.m) >= 0) {\n res.isub(this.m);\n }\n return res;\n };\n\n Red.prototype.sub = function sub (a, b) {\n this._verify2(a, b);\n\n var res = a.sub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res._forceRed(this);\n };\n\n Red.prototype.isub = function isub (a, b) {\n this._verify2(a, b);\n\n var res = a.isub(b);\n if (res.cmpn(0) < 0) {\n res.iadd(this.m);\n }\n return res;\n };\n\n Red.prototype.shl = function shl (a, num) {\n this._verify1(a);\n return this.imod(a.ushln(num));\n };\n\n Red.prototype.imul = function imul (a, b) {\n this._verify2(a, b);\n return this.imod(a.imul(b));\n };\n\n Red.prototype.mul = function mul (a, b) {\n this._verify2(a, b);\n return this.imod(a.mul(b));\n };\n\n Red.prototype.isqr = function isqr (a) {\n return this.imul(a, a.clone());\n };\n\n Red.prototype.sqr = function sqr (a) {\n return this.mul(a, a);\n };\n\n Red.prototype.sqrt = function sqrt (a) {\n if (a.isZero()) return a.clone();\n\n var mod3 = this.m.andln(3);\n assert(mod3 % 2 === 1);\n\n // Fast case\n if (mod3 === 3) {\n var pow = this.m.add(new BN(1)).iushrn(2);\n return this.pow(a, pow);\n }\n\n // Tonelli-Shanks algorithm (Totally unoptimized and slow)\n //\n // Find Q and S, that Q * 2 ^ S = (P - 1)\n var q = this.m.subn(1);\n var s = 0;\n while (!q.isZero() && q.andln(1) === 0) {\n s++;\n q.iushrn(1);\n }\n assert(!q.isZero());\n\n var one = new BN(1).toRed(this);\n var nOne = one.redNeg();\n\n // Find quadratic non-residue\n // NOTE: Max is such because of generalized Riemann hypothesis.\n var lpow = this.m.subn(1).iushrn(1);\n var z = this.m.bitLength();\n z = new BN(2 * z * z).toRed(this);\n\n while (this.pow(z, lpow).cmp(nOne) !== 0) {\n z.redIAdd(nOne);\n }\n\n var c = this.pow(z, q);\n var r = this.pow(a, q.addn(1).iushrn(1));\n var t = this.pow(a, q);\n var m = s;\n while (t.cmp(one) !== 0) {\n var tmp = t;\n for (var i = 0; tmp.cmp(one) !== 0; i++) {\n tmp = tmp.redSqr();\n }\n assert(i < m);\n var b = this.pow(c, new BN(1).iushln(m - i - 1));\n\n r = r.redMul(b);\n c = b.redSqr();\n t = t.redMul(c);\n m = i;\n }\n\n return r;\n };\n\n Red.prototype.invm = function invm (a) {\n var inv = a._invmp(this.m);\n if (inv.negative !== 0) {\n inv.negative = 0;\n return this.imod(inv).redNeg();\n } else {\n return this.imod(inv);\n }\n };\n\n Red.prototype.pow = function pow (a, num) {\n if (num.isZero()) return new BN(1).toRed(this);\n if (num.cmpn(1) === 0) return a.clone();\n\n var windowSize = 4;\n var wnd = new Array(1 << windowSize);\n wnd[0] = new BN(1).toRed(this);\n wnd[1] = a;\n for (var i = 2; i < wnd.length; i++) {\n wnd[i] = this.mul(wnd[i - 1], a);\n }\n\n var res = wnd[0];\n var current = 0;\n var currentLen = 0;\n var start = num.bitLength() % 26;\n if (start === 0) {\n start = 26;\n }\n\n for (i = num.length - 1; i >= 0; i--) {\n var word = num.words[i];\n for (var j = start - 1; j >= 0; j--) {\n var bit = (word >> j) & 1;\n if (res !== wnd[0]) {\n res = this.sqr(res);\n }\n\n if (bit === 0 && current === 0) {\n currentLen = 0;\n continue;\n }\n\n current <<= 1;\n current |= bit;\n currentLen++;\n if (currentLen !== windowSize && (i !== 0 || j !== 0)) continue;\n\n res = this.mul(res, wnd[current]);\n currentLen = 0;\n current = 0;\n }\n start = 26;\n }\n\n return res;\n };\n\n Red.prototype.convertTo = function convertTo (num) {\n var r = num.umod(this.m);\n\n return r === num ? r.clone() : r;\n };\n\n Red.prototype.convertFrom = function convertFrom (num) {\n var res = num.clone();\n res.red = null;\n return res;\n };\n\n //\n // Montgomery method engine\n //\n\n BN.mont = function mont (num) {\n return new Mont(num);\n };\n\n function Mont (m) {\n Red.call(this, m);\n\n this.shift = this.m.bitLength();\n if (this.shift % 26 !== 0) {\n this.shift += 26 - (this.shift % 26);\n }\n\n this.r = new BN(1).iushln(this.shift);\n this.r2 = this.imod(this.r.sqr());\n this.rinv = this.r._invmp(this.m);\n\n this.minv = this.rinv.mul(this.r).isubn(1).div(this.m);\n this.minv = this.minv.umod(this.r);\n this.minv = this.r.sub(this.minv);\n }\n inherits(Mont, Red);\n\n Mont.prototype.convertTo = function convertTo (num) {\n return this.imod(num.ushln(this.shift));\n };\n\n Mont.prototype.convertFrom = function convertFrom (num) {\n var r = this.imod(num.mul(this.rinv));\n r.red = null;\n return r;\n };\n\n Mont.prototype.imul = function imul (a, b) {\n if (a.isZero() || b.isZero()) {\n a.words[0] = 0;\n a.length = 1;\n return a;\n }\n\n var t = a.imul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.mul = function mul (a, b) {\n if (a.isZero() || b.isZero()) return new BN(0)._forceRed(this);\n\n var t = a.mul(b);\n var c = t.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m);\n var u = t.isub(c).iushrn(this.shift);\n var res = u;\n if (u.cmp(this.m) >= 0) {\n res = u.isub(this.m);\n } else if (u.cmpn(0) < 0) {\n res = u.iadd(this.m);\n }\n\n return res._forceRed(this);\n };\n\n Mont.prototype.invm = function invm (a) {\n // (AR)^-1 * R^2 = (A^-1 * R^-1) * R^2 = A^-1 * R\n var res = this.imod(a._invmp(this.m).mul(this.r2));\n return res._forceRed(this);\n };\n})(typeof module === 'undefined' || module, this);\n","/*! safe-buffer. MIT License. Feross Aboukhadijeh */\n/* eslint-disable node/no-deprecated-api */\nvar buffer = require('buffer')\nvar Buffer = buffer.Buffer\n\n// alternative to using Object.keys for old browsers\nfunction copyProps (src, dst) {\n for (var key in src) {\n dst[key] = src[key]\n }\n}\nif (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) {\n module.exports = buffer\n} else {\n // Copy properties from require('buffer')\n copyProps(buffer, exports)\n exports.Buffer = SafeBuffer\n}\n\nfunction SafeBuffer (arg, encodingOrOffset, length) {\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.prototype = Object.create(Buffer.prototype)\n\n// Copy static methods from Buffer\ncopyProps(Buffer, SafeBuffer)\n\nSafeBuffer.from = function (arg, encodingOrOffset, length) {\n if (typeof arg === 'number') {\n throw new TypeError('Argument must not be a number')\n }\n return Buffer(arg, encodingOrOffset, length)\n}\n\nSafeBuffer.alloc = function (size, fill, encoding) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n var buf = Buffer(size)\n if (fill !== undefined) {\n if (typeof encoding === 'string') {\n buf.fill(fill, encoding)\n } else {\n buf.fill(fill)\n }\n } else {\n buf.fill(0)\n }\n return buf\n}\n\nSafeBuffer.allocUnsafe = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return Buffer(size)\n}\n\nSafeBuffer.allocUnsafeSlow = function (size) {\n if (typeof size !== 'number') {\n throw new TypeError('Argument must be a number')\n }\n return buffer.SlowBuffer(size)\n}\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 // Find code of next character\n var charCode = source.charCodeAt(psz)\n // Base map can not be indexed using char code\n if (charCode > 255) { return }\n // Decode character\n var carry = BASE_MAP[charCode]\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","var basex = require('base-x')\nvar ALPHABET = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'\n\nmodule.exports = basex(ALPHABET)\n","function anumber(n) {\n if (!Number.isSafeInteger(n) || n < 0)\n throw new Error('positive integer expected, got ' + n);\n}\n// copied from utils\nfunction isBytes(a) {\n return a instanceof Uint8Array || (ArrayBuffer.isView(a) && a.constructor.name === 'Uint8Array');\n}\nfunction abytes(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 + ', got length=' + b.length);\n}\nfunction ahash(h) {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n anumber(h.outputLen);\n anumber(h.blockLen);\n}\nfunction aexists(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 aoutput(out, instance) {\n abytes(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 { anumber, anumber as number, abytes, abytes as bytes, ahash, aexists, aoutput };\nconst assert = {\n number: anumber,\n bytes: abytes,\n hash: ahash,\n exists: aexists,\n output: aoutput,\n};\nexport default assert;\n//# sourceMappingURL=_assert.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 { 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 || (ArrayBuffer.isView(a) && 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 = /* @__PURE__ */ (() => 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(ch) {\n if (ch >= asciis._0 && ch <= asciis._9)\n return ch - asciis._0; // '2' => 50-48\n if (ch >= asciis.A && ch <= asciis.F)\n return ch - (asciis.A - 10); // 'B' => 66-(65-10)\n if (ch >= asciis.a && ch <= asciis.f)\n return ch - (asciis.a - 10); // 'b' => 98-(97-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('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; // multiply first octet, e.g. 'a3' => 10*16+3 => 160 + 3 => 163\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}\nexport function checkOpts(defaults, opts) {\n if (opts !== undefined && {}.toString.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 // Legacy Node.js compatibility\n if (crypto && typeof crypto.randomBytes === 'function') {\n return crypto.randomBytes(bytesLength);\n }\n throw new Error('crypto.getRandomValues must be defined');\n}\n//# sourceMappingURL=utils.js.map","import { aexists, aoutput } from './_assert.js';\nimport { Hash, createView, toBytes } from './utils.js';\n/**\n * Polyfill for Safari 14\n */\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/**\n * Choice: a ? b : c\n */\nexport const Chi = (a, b, c) => (a & b) ^ (~a & c);\n/**\n * Majority function, true if any two inputs is true\n */\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 aexists(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 aexists(this);\n aoutput(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","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^70 hashes/sec (2^95 hashes/year) as per late 2024.\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);\nexport class 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());\n/**\n * SHA2-224 hash function\n */\nexport const sha224 = /* @__PURE__ */ wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","'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;","\"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","import {Buffer} from 'buffer';\nimport {serialize, deserialize, deserializeUnchecked} from 'borsh';\n\n// Class wrapping a plain object\nexport class Struct {\n constructor(properties: any) {\n Object.assign(this, properties);\n }\n\n encode(): Buffer {\n return Buffer.from(serialize(SOLANA_SCHEMA, this));\n }\n\n static decode(data: Buffer): any {\n return deserialize(SOLANA_SCHEMA, this, data);\n }\n\n static decodeUnchecked(data: Buffer): any {\n return deserializeUnchecked(SOLANA_SCHEMA, this, data);\n }\n}\n\n// Class representing a Rust-compatible enum, since enums are only strings or\n// numbers in pure JS\nexport class Enum extends Struct {\n enum: string = '';\n constructor(properties: any) {\n super(properties);\n if (Object.keys(properties).length !== 1) {\n throw new Error('Enum can only take single value');\n }\n Object.keys(properties).map(key => {\n this.enum = key;\n });\n }\n}\n\nexport const SOLANA_SCHEMA: Map = new Map();\n","import BN from 'bn.js';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport {sha256} from '@noble/hashes/sha256';\n\nimport {isOnCurve} from './utils/ed25519';\nimport {Struct, SOLANA_SCHEMA} from './utils/borsh-schema';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * Maximum length of derived pubkey seed\n */\nexport const MAX_SEED_LENGTH = 32;\n\n/**\n * Size of public key in bytes\n */\nexport const PUBLIC_KEY_LENGTH = 32;\n\n/**\n * Value to be converted into public key\n */\nexport type PublicKeyInitData =\n | number\n | string\n | Uint8Array\n | Array\n | PublicKeyData;\n\n/**\n * JSON object representation of PublicKey class\n */\nexport type PublicKeyData = {\n /** @internal */\n _bn: BN;\n};\n\nfunction isPublicKeyData(value: PublicKeyInitData): value is PublicKeyData {\n return (value as PublicKeyData)._bn !== undefined;\n}\n\n// local counter used by PublicKey.unique()\nlet uniquePublicKeyCounter = 1;\n\n/**\n * A public key\n */\nexport class PublicKey extends Struct {\n /** @internal */\n _bn: BN;\n\n /**\n * Create a new PublicKey object\n * @param value ed25519 public key as buffer or base-58 encoded string\n */\n constructor(value: PublicKeyInitData) {\n super({});\n if (isPublicKeyData(value)) {\n this._bn = value._bn;\n } else {\n if (typeof value === 'string') {\n // assume base 58 encoding by default\n const decoded = bs58.decode(value);\n if (decoded.length != PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n this._bn = new BN(decoded);\n } else {\n this._bn = new BN(value);\n }\n\n if (this._bn.byteLength() > PUBLIC_KEY_LENGTH) {\n throw new Error(`Invalid public key input`);\n }\n }\n }\n\n /**\n * Returns a unique PublicKey for tests and benchmarks using a counter\n */\n static unique(): PublicKey {\n const key = new PublicKey(uniquePublicKeyCounter);\n uniquePublicKeyCounter += 1;\n return new PublicKey(key.toBuffer());\n }\n\n /**\n * Default public key value. The base58-encoded string representation is all ones (as seen below)\n * The underlying BN number is 32 bytes that are all zeros\n */\n static default: PublicKey = new PublicKey('11111111111111111111111111111111');\n\n /**\n * Checks if two publicKeys are equal\n */\n equals(publicKey: PublicKey): boolean {\n return this._bn.eq(publicKey._bn);\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toBase58(): string {\n return bs58.encode(this.toBytes());\n }\n\n toJSON(): string {\n return this.toBase58();\n }\n\n /**\n * Return the byte array representation of the public key in big endian\n */\n toBytes(): Uint8Array {\n const buf = this.toBuffer();\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength);\n }\n\n /**\n * Return the Buffer representation of the public key in big endian\n */\n toBuffer(): Buffer {\n const b = this._bn.toArrayLike(Buffer);\n if (b.length === PUBLIC_KEY_LENGTH) {\n return b;\n }\n\n const zeroPad = Buffer.alloc(32);\n b.copy(zeroPad, 32 - b.length);\n return zeroPad;\n }\n\n get [Symbol.toStringTag](): string {\n return `PublicKey(${this.toString()})`;\n }\n\n /**\n * Return the base-58 representation of the public key\n */\n toString(): string {\n return this.toBase58();\n }\n\n /**\n * Derive a public key from another key, a seed, and a program ID.\n * The program ID will also serve as the owner of the public key, giving\n * it permission to write data to the account.\n */\n /* eslint-disable require-await */\n static async createWithSeed(\n fromPublicKey: PublicKey,\n seed: string,\n programId: PublicKey,\n ): Promise {\n const buffer = Buffer.concat([\n fromPublicKey.toBuffer(),\n Buffer.from(seed),\n programId.toBuffer(),\n ]);\n const publicKeyBytes = sha256(buffer);\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Derive a program address from seeds and a program ID.\n */\n /* eslint-disable require-await */\n static createProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): PublicKey {\n let buffer = Buffer.alloc(0);\n seeds.forEach(function (seed) {\n if (seed.length > MAX_SEED_LENGTH) {\n throw new TypeError(`Max seed length exceeded`);\n }\n buffer = Buffer.concat([buffer, toBuffer(seed)]);\n });\n buffer = Buffer.concat([\n buffer,\n programId.toBuffer(),\n Buffer.from('ProgramDerivedAddress'),\n ]);\n const publicKeyBytes = sha256(buffer);\n if (isOnCurve(publicKeyBytes)) {\n throw new Error(`Invalid seeds, address must fall off the curve`);\n }\n return new PublicKey(publicKeyBytes);\n }\n\n /**\n * Async version of createProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link createProgramAddressSync} instead\n */\n /* eslint-disable require-await */\n static async createProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise {\n return this.createProgramAddressSync(seeds, programId);\n }\n\n /**\n * Find a valid program address\n *\n * Valid program addresses must fall off the ed25519 curve. This function\n * iterates a nonce until it finds one that when combined with the seeds\n * results in a valid program address.\n */\n static findProgramAddressSync(\n seeds: Array,\n programId: PublicKey,\n ): [PublicKey, number] {\n let nonce = 255;\n let address;\n while (nonce != 0) {\n try {\n const seedsWithNonce = seeds.concat(Buffer.from([nonce]));\n address = this.createProgramAddressSync(seedsWithNonce, programId);\n } catch (err) {\n if (err instanceof TypeError) {\n throw err;\n }\n nonce--;\n continue;\n }\n return [address, nonce];\n }\n throw new Error(`Unable to find a viable program address nonce`);\n }\n\n /**\n * Async version of findProgramAddressSync\n * For backwards compatibility\n *\n * @deprecated Use {@link findProgramAddressSync} instead\n */\n static async findProgramAddress(\n seeds: Array,\n programId: PublicKey,\n ): Promise<[PublicKey, number]> {\n return this.findProgramAddressSync(seeds, programId);\n }\n\n /**\n * Check that a pubkey is on the ed25519 curve.\n */\n static isOnCurve(pubkeyData: PublicKeyInitData): boolean {\n const pubkey = new PublicKey(pubkeyData);\n return isOnCurve(pubkey.toBytes());\n }\n}\n\nSOLANA_SCHEMA.set(PublicKey, {\n kind: 'struct',\n fields: [['_bn', 'u256']],\n});\n","import {Buffer} from 'buffer';\n\nimport {generatePrivateKey, getPublicKey} from './utils/ed25519';\nimport {toBuffer} from './utils/to-buffer';\nimport {PublicKey} from './publickey';\n\n/**\n * An account key pair (public and secret keys).\n *\n * @deprecated since v1.10.0, please use {@link Keypair} instead.\n */\nexport class Account {\n /** @internal */\n private _publicKey: Buffer;\n /** @internal */\n private _secretKey: Buffer;\n\n /**\n * Create a new Account object\n *\n * If the secretKey parameter is not provided a new key pair is randomly\n * created for the account\n *\n * @param secretKey Secret key for the account\n */\n constructor(secretKey?: Uint8Array | Array) {\n if (secretKey) {\n const secretKeyBuffer = toBuffer(secretKey);\n if (secretKey.length !== 64) {\n throw new Error('bad secret key size');\n }\n this._publicKey = secretKeyBuffer.slice(32, 64);\n this._secretKey = secretKeyBuffer.slice(0, 32);\n } else {\n this._secretKey = toBuffer(generatePrivateKey());\n this._publicKey = toBuffer(getPublicKey(this._secretKey));\n }\n }\n\n /**\n * The public key for this account\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._publicKey);\n }\n\n /**\n * The **unencrypted** secret key for this account. The first 32 bytes\n * is the private scalar and the last 32 bytes is the public key.\n * Read more: https://blog.mozilla.org/warner/2011/11/29/ed25519-keys/\n */\n get secretKey(): Buffer {\n return Buffer.concat([this._secretKey, this._publicKey], 64);\n }\n}\n","import {PublicKey} from './publickey';\n\nexport const BPF_LOADER_DEPRECATED_PROGRAM_ID = new PublicKey(\n 'BPFLoader1111111111111111111111111111111111',\n);\n","/* 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","/**\n * Maximum over-the-wire size of a Transaction\n *\n * 1280 is IPv6 minimum MTU\n * 40 bytes is the size of the IPv6 header\n * 8 bytes is the size of the fragment header\n */\nexport const PACKET_DATA_SIZE = 1280 - 40 - 8;\n\nexport const VERSION_PREFIX_MASK = 0x7f;\n\nexport const SIGNATURE_LENGTH_IN_BYTES = 64;\n","export class TransactionExpiredBlockheightExceededError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: block height exceeded.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(\n TransactionExpiredBlockheightExceededError.prototype,\n 'name',\n {\n value: 'TransactionExpiredBlockheightExceededError',\n },\n);\n\nexport class TransactionExpiredTimeoutError extends Error {\n signature: string;\n\n constructor(signature: string, timeoutSeconds: number) {\n super(\n `Transaction was not confirmed in ${timeoutSeconds.toFixed(\n 2,\n )} seconds. It is ` +\n 'unknown if it succeeded or failed. Check signature ' +\n `${signature} using the Solana Explorer or CLI tools.`,\n );\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredTimeoutError.prototype, 'name', {\n value: 'TransactionExpiredTimeoutError',\n});\n\nexport class TransactionExpiredNonceInvalidError extends Error {\n signature: string;\n\n constructor(signature: string) {\n super(`Signature ${signature} has expired: the nonce is no longer valid.`);\n this.signature = signature;\n }\n}\n\nObject.defineProperty(TransactionExpiredNonceInvalidError.prototype, 'name', {\n value: 'TransactionExpiredNonceInvalidError',\n});\n","import {LoadedAddresses} from '../connection';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {MessageCompiledInstruction} from './index';\n\nexport type AccountKeysFromLookups = LoadedAddresses;\n\nexport class MessageAccountKeys {\n staticAccountKeys: Array;\n accountKeysFromLookups?: AccountKeysFromLookups;\n\n constructor(\n staticAccountKeys: Array,\n accountKeysFromLookups?: AccountKeysFromLookups,\n ) {\n this.staticAccountKeys = staticAccountKeys;\n this.accountKeysFromLookups = accountKeysFromLookups;\n }\n\n keySegments(): Array> {\n const keySegments = [this.staticAccountKeys];\n if (this.accountKeysFromLookups) {\n keySegments.push(this.accountKeysFromLookups.writable);\n keySegments.push(this.accountKeysFromLookups.readonly);\n }\n return keySegments;\n }\n\n get(index: number): PublicKey | undefined {\n for (const keySegment of this.keySegments()) {\n if (index < keySegment.length) {\n return keySegment[index];\n } else {\n index -= keySegment.length;\n }\n }\n return;\n }\n\n get length(): number {\n return this.keySegments().flat().length;\n }\n\n compileInstructions(\n instructions: Array,\n ): Array {\n // Bail early if any account indexes would overflow a u8\n const U8_MAX = 255;\n if (this.length > U8_MAX + 1) {\n throw new Error('Account index overflow encountered during compilation');\n }\n\n const keyIndexMap = new Map();\n this.keySegments()\n .flat()\n .forEach((key, index) => {\n keyIndexMap.set(key.toBase58(), index);\n });\n\n const findKeyIndex = (key: PublicKey) => {\n const keyIndex = keyIndexMap.get(key.toBase58());\n if (keyIndex === undefined)\n throw new Error(\n 'Encountered an unknown instruction account key during compilation',\n );\n return keyIndex;\n };\n\n return instructions.map((instruction): MessageCompiledInstruction => {\n return {\n programIdIndex: findKeyIndex(instruction.programId),\n accountKeyIndexes: instruction.keys.map(meta =>\n findKeyIndex(meta.pubkey),\n ),\n data: instruction.data,\n };\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {VoteAuthorizeWithSeedArgs} from './programs/vote';\n\n/**\n * Layout for a public key\n */\nexport const publicKey = (property: string = 'publicKey') => {\n return BufferLayout.blob(32, property);\n};\n\n/**\n * Layout for a signature\n */\nexport const signature = (property: string = 'signature') => {\n return BufferLayout.blob(64, property);\n};\n\n/**\n * Layout for a 64bit unsigned value\n */\nexport const uint64 = (property: string = 'uint64') => {\n return BufferLayout.blob(8, property);\n};\n\ninterface IRustStringShim\n extends Omit<\n BufferLayout.Structure<\n Readonly<{\n length: number;\n lengthPadding: number;\n chars: Uint8Array;\n }>\n >,\n 'decode' | 'encode' | 'replicate'\n > {\n alloc: (str: string) => number;\n decode: (b: Uint8Array, offset?: number) => string;\n encode: (str: string, b: Uint8Array, offset?: number) => number;\n replicate: (property: string) => this;\n}\n\n/**\n * Layout for a Rust String type\n */\nexport const rustString = (\n property: string = 'string',\n): BufferLayout.Layout => {\n const rsl = BufferLayout.struct<\n Readonly<{\n length?: number;\n lengthPadding?: number;\n chars: Uint8Array;\n }>\n >(\n [\n BufferLayout.u32('length'),\n BufferLayout.u32('lengthPadding'),\n BufferLayout.blob(BufferLayout.offset(BufferLayout.u32(), -8), 'chars'),\n ],\n property,\n );\n const _decode = rsl.decode.bind(rsl);\n const _encode = rsl.encode.bind(rsl);\n\n const rslShim = rsl as unknown as IRustStringShim;\n\n rslShim.decode = (b: Uint8Array, offset?: number) => {\n const data = _decode(b, offset);\n return data['chars'].toString();\n };\n\n rslShim.encode = (str: string, b: Uint8Array, offset?: number) => {\n const data = {\n chars: Buffer.from(str, 'utf8'),\n };\n return _encode(data, b, offset);\n };\n\n rslShim.alloc = (str: string) => {\n return (\n BufferLayout.u32().span +\n BufferLayout.u32().span +\n Buffer.from(str, 'utf8').length\n );\n };\n\n return rslShim;\n};\n\n/**\n * Layout for an Authorized object\n */\nexport const authorized = (property: string = 'authorized') => {\n return BufferLayout.struct<\n Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n }>\n >([publicKey('staker'), publicKey('withdrawer')], property);\n};\n\n/**\n * Layout for a Lockup object\n */\nexport const lockup = (property: string = 'lockup') => {\n return BufferLayout.struct<\n Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n }>\n >(\n [\n BufferLayout.ns64('unixTimestamp'),\n BufferLayout.ns64('epoch'),\n publicKey('custodian'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteInit object\n */\nexport const voteInit = (property: string = 'voteInit') => {\n return BufferLayout.struct<\n Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>\n >(\n [\n publicKey('nodePubkey'),\n publicKey('authorizedVoter'),\n publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n ],\n property,\n );\n};\n\n/**\n * Layout for a VoteAuthorizeWithSeedArgs object\n */\nexport const voteAuthorizeWithSeedArgs = (\n property: string = 'voteAuthorizeWithSeedArgs',\n) => {\n return BufferLayout.struct(\n [\n BufferLayout.u32('voteAuthorizationType'),\n publicKey('currentAuthorityDerivedKeyOwnerPubkey'),\n rustString('currentAuthorityDerivedKeySeed'),\n publicKey('newAuthorized'),\n ],\n property,\n );\n};\n\nexport function getAlloc(type: any, fields: any): number {\n const getItemAlloc = (item: any): number => {\n if (item.span >= 0) {\n return item.span;\n } else if (typeof item.alloc === 'function') {\n return item.alloc(fields[item.property]);\n } else if ('count' in item && 'elementLayout' in item) {\n const field = fields[item.property];\n if (Array.isArray(field)) {\n return field.length * getItemAlloc(item.elementLayout);\n }\n } else if ('fields' in item) {\n // This is a `Structure` whose size needs to be recursively measured.\n return getAlloc({layout: item}, fields[item.property]);\n }\n // Couldn't determine allocated size of layout\n return 0;\n };\n\n let alloc = 0;\n type.layout.fields.forEach((item: any) => {\n alloc += getItemAlloc(item);\n });\n\n return alloc;\n}\n","export function decodeLength(bytes: Array): number {\n let len = 0;\n let size = 0;\n for (;;) {\n let elem = bytes.shift() as number;\n len |= (elem & 0x7f) << (size * 7);\n size += 1;\n if ((elem & 0x80) === 0) {\n break;\n }\n }\n return len;\n}\n\nexport function encodeLength(bytes: Array, len: number) {\n let rem_len = len;\n for (;;) {\n let elem = rem_len & 0x7f;\n rem_len >>= 7;\n if (rem_len == 0) {\n bytes.push(elem);\n break;\n } else {\n elem |= 0x80;\n bytes.push(elem);\n }\n }\n}\n","export default function (\n condition: unknown,\n message?: string,\n): asserts condition {\n if (!condition) {\n throw new Error(message || 'Assertion failed');\n }\n}\n","import {MessageHeader, MessageAddressTableLookup} from './index';\nimport {AccountKeysFromLookups} from './account-keys';\nimport {AddressLookupTableAccount} from '../programs';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {PublicKey} from '../publickey';\n\nexport type CompiledKeyMeta = {\n isSigner: boolean;\n isWritable: boolean;\n isInvoked: boolean;\n};\n\ntype KeyMetaMap = Map;\n\nexport class CompiledKeys {\n payer: PublicKey;\n keyMetaMap: KeyMetaMap;\n\n constructor(payer: PublicKey, keyMetaMap: KeyMetaMap) {\n this.payer = payer;\n this.keyMetaMap = keyMetaMap;\n }\n\n static compile(\n instructions: Array,\n payer: PublicKey,\n ): CompiledKeys {\n const keyMetaMap: KeyMetaMap = new Map();\n const getOrInsertDefault = (pubkey: PublicKey): CompiledKeyMeta => {\n const address = pubkey.toBase58();\n let keyMeta = keyMetaMap.get(address);\n if (keyMeta === undefined) {\n keyMeta = {\n isSigner: false,\n isWritable: false,\n isInvoked: false,\n };\n keyMetaMap.set(address, keyMeta);\n }\n return keyMeta;\n };\n\n const payerKeyMeta = getOrInsertDefault(payer);\n payerKeyMeta.isSigner = true;\n payerKeyMeta.isWritable = true;\n\n for (const ix of instructions) {\n getOrInsertDefault(ix.programId).isInvoked = true;\n for (const accountMeta of ix.keys) {\n const keyMeta = getOrInsertDefault(accountMeta.pubkey);\n keyMeta.isSigner ||= accountMeta.isSigner;\n keyMeta.isWritable ||= accountMeta.isWritable;\n }\n }\n\n return new CompiledKeys(payer, keyMetaMap);\n }\n\n getMessageComponents(): [MessageHeader, Array] {\n const mapEntries = [...this.keyMetaMap.entries()];\n assert(mapEntries.length <= 256, 'Max static account keys length exceeded');\n\n const writableSigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && meta.isWritable,\n );\n const readonlySigners = mapEntries.filter(\n ([, meta]) => meta.isSigner && !meta.isWritable,\n );\n const writableNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && meta.isWritable,\n );\n const readonlyNonSigners = mapEntries.filter(\n ([, meta]) => !meta.isSigner && !meta.isWritable,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: writableSigners.length + readonlySigners.length,\n numReadonlySignedAccounts: readonlySigners.length,\n numReadonlyUnsignedAccounts: readonlyNonSigners.length,\n };\n\n // sanity checks\n {\n assert(\n writableSigners.length > 0,\n 'Expected at least one writable signer key',\n );\n const [payerAddress] = writableSigners[0];\n assert(\n payerAddress === this.payer.toBase58(),\n 'Expected first writable signer key to be the fee payer',\n );\n }\n\n const staticAccountKeys = [\n ...writableSigners.map(([address]) => new PublicKey(address)),\n ...readonlySigners.map(([address]) => new PublicKey(address)),\n ...writableNonSigners.map(([address]) => new PublicKey(address)),\n ...readonlyNonSigners.map(([address]) => new PublicKey(address)),\n ];\n\n return [header, staticAccountKeys];\n }\n\n extractTableLookup(\n lookupTable: AddressLookupTableAccount,\n ): [MessageAddressTableLookup, AccountKeysFromLookups] | undefined {\n const [writableIndexes, drainedWritableKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && keyMeta.isWritable,\n );\n const [readonlyIndexes, drainedReadonlyKeys] =\n this.drainKeysFoundInLookupTable(\n lookupTable.state.addresses,\n keyMeta =>\n !keyMeta.isSigner && !keyMeta.isInvoked && !keyMeta.isWritable,\n );\n\n // Don't extract lookup if no keys were found\n if (writableIndexes.length === 0 && readonlyIndexes.length === 0) {\n return;\n }\n\n return [\n {\n accountKey: lookupTable.key,\n writableIndexes,\n readonlyIndexes,\n },\n {\n writable: drainedWritableKeys,\n readonly: drainedReadonlyKeys,\n },\n ];\n }\n\n /** @internal */\n private drainKeysFoundInLookupTable(\n lookupTableEntries: Array,\n keyMetaFilter: (keyMeta: CompiledKeyMeta) => boolean,\n ): [Array, Array] {\n const lookupTableIndexes = new Array();\n const drainedKeys = new Array();\n\n for (const [address, keyMeta] of this.keyMetaMap.entries()) {\n if (keyMetaFilter(keyMeta)) {\n const key = new PublicKey(address);\n const lookupTableIndex = lookupTableEntries.findIndex(entry =>\n entry.equals(key),\n );\n if (lookupTableIndex >= 0) {\n assert(lookupTableIndex < 256, 'Max lookup table index exceeded');\n lookupTableIndexes.push(lookupTableIndex);\n drainedKeys.push(key);\n this.keyMetaMap.delete(address);\n }\n }\n }\n\n return [lookupTableIndexes, drainedKeys];\n }\n}\n","const END_OF_BUFFER_ERROR_MESSAGE = 'Reached end of buffer unexpectedly';\n\n/**\n * Delegates to `Array#shift`, but throws if the array is zero-length.\n */\nexport function guardedShift(byteArray: T[]): T {\n if (byteArray.length === 0) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.shift() as T;\n}\n\n/**\n * Delegates to `Array#splice`, but throws if the section being spliced out extends past the end of\n * the array.\n */\nexport function guardedSplice(\n byteArray: T[],\n ...args:\n | [start: number, deleteCount?: number]\n | [start: number, deleteCount: number, ...items: T[]]\n): T[] {\n const [start] = args;\n if (\n args.length === 2 // Implies that `deleteCount` was supplied\n ? start + (args[1] ?? 0) > byteArray.length\n : start >= byteArray.length\n ) {\n throw new Error(END_OF_BUFFER_ERROR_MESSAGE);\n }\n return byteArray.splice(\n ...(args as Parameters),\n );\n}\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport type {Blockhash} from '../blockhash';\nimport * as Layout from '../layout';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {TransactionInstruction} from '../transaction';\nimport {CompiledKeys} from './compiled-keys';\nimport {MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * An instruction to execute by a program\n *\n * @property {number} programIdIndex\n * @property {number[]} accounts\n * @property {string} data\n */\nexport type CompiledInstruction = {\n /** Index into the transaction keys array indicating the program account that executes this instruction */\n programIdIndex: number;\n /** Ordered indices into the transaction keys array indicating which accounts to pass to the program */\n accounts: number[];\n /** The program input data encoded as base 58 */\n data: string;\n};\n\n/**\n * Message constructor arguments\n */\nexport type MessageArgs = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** All the account keys used by this transaction */\n accountKeys: string[] | PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n instructions: CompiledInstruction[];\n};\n\nexport type CompileLegacyArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\n/**\n * List of instructions to be processed atomically\n */\nexport class Message {\n header: MessageHeader;\n accountKeys: PublicKey[];\n recentBlockhash: Blockhash;\n instructions: CompiledInstruction[];\n\n private indexToProgramIds: Map = new Map<\n number,\n PublicKey\n >();\n\n constructor(args: MessageArgs) {\n this.header = args.header;\n this.accountKeys = args.accountKeys.map(account => new PublicKey(account));\n this.recentBlockhash = args.recentBlockhash;\n this.instructions = args.instructions;\n this.instructions.forEach(ix =>\n this.indexToProgramIds.set(\n ix.programIdIndex,\n this.accountKeys[ix.programIdIndex],\n ),\n );\n }\n\n get version(): 'legacy' {\n return 'legacy';\n }\n\n get staticAccountKeys(): Array {\n return this.accountKeys;\n }\n\n get compiledInstructions(): Array {\n return this.instructions.map(\n (ix): MessageCompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n }),\n );\n }\n\n get addressTableLookups(): Array {\n return [];\n }\n\n getAccountKeys(): MessageAccountKeys {\n return new MessageAccountKeys(this.staticAccountKeys);\n }\n\n static compile(args: CompileLegacyArgs): Message {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(staticAccountKeys);\n const instructions = accountKeys.compileInstructions(args.instructions).map(\n (ix: MessageCompiledInstruction): CompiledInstruction => ({\n programIdIndex: ix.programIdIndex,\n accounts: ix.accountKeyIndexes,\n data: bs58.encode(ix.data),\n }),\n );\n return new Message({\n header,\n accountKeys: staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n instructions,\n });\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = this.accountKeys.length - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n isProgramId(index: number): boolean {\n return this.indexToProgramIds.has(index);\n }\n\n programIds(): PublicKey[] {\n return [...this.indexToProgramIds.values()];\n }\n\n nonProgramIds(): PublicKey[] {\n return this.accountKeys.filter((_, index) => !this.isProgramId(index));\n }\n\n serialize(): Buffer {\n const numKeys = this.accountKeys.length;\n\n let keyCount: number[] = [];\n shortvec.encodeLength(keyCount, numKeys);\n\n const instructions = this.instructions.map(instruction => {\n const {accounts, programIdIndex} = instruction;\n const data = Array.from(bs58.decode(instruction.data));\n\n let keyIndicesCount: number[] = [];\n shortvec.encodeLength(keyIndicesCount, accounts.length);\n\n let dataCount: number[] = [];\n shortvec.encodeLength(dataCount, data.length);\n\n return {\n programIdIndex,\n keyIndicesCount: Buffer.from(keyIndicesCount),\n keyIndices: accounts,\n dataLength: Buffer.from(dataCount),\n data,\n };\n });\n\n let instructionCount: number[] = [];\n shortvec.encodeLength(instructionCount, instructions.length);\n let instructionBuffer = Buffer.alloc(PACKET_DATA_SIZE);\n Buffer.from(instructionCount).copy(instructionBuffer);\n let instructionBufferLength = instructionCount.length;\n\n instructions.forEach(instruction => {\n const instructionLayout = BufferLayout.struct<\n Readonly<{\n data: number[];\n dataLength: Uint8Array;\n keyIndices: number[];\n keyIndicesCount: Uint8Array;\n programIdIndex: number;\n }>\n >([\n BufferLayout.u8('programIdIndex'),\n\n BufferLayout.blob(\n instruction.keyIndicesCount.length,\n 'keyIndicesCount',\n ),\n BufferLayout.seq(\n BufferLayout.u8('keyIndex'),\n instruction.keyIndices.length,\n 'keyIndices',\n ),\n BufferLayout.blob(instruction.dataLength.length, 'dataLength'),\n BufferLayout.seq(\n BufferLayout.u8('userdatum'),\n instruction.data.length,\n 'data',\n ),\n ]);\n const length = instructionLayout.encode(\n instruction,\n instructionBuffer,\n instructionBufferLength,\n );\n instructionBufferLength += length;\n });\n instructionBuffer = instructionBuffer.slice(0, instructionBufferLength);\n\n const signDataLayout = BufferLayout.struct<\n Readonly<{\n keyCount: Uint8Array;\n keys: Uint8Array[];\n numReadonlySignedAccounts: Uint8Array;\n numReadonlyUnsignedAccounts: Uint8Array;\n numRequiredSignatures: Uint8Array;\n recentBlockhash: Uint8Array;\n }>\n >([\n BufferLayout.blob(1, 'numRequiredSignatures'),\n BufferLayout.blob(1, 'numReadonlySignedAccounts'),\n BufferLayout.blob(1, 'numReadonlyUnsignedAccounts'),\n BufferLayout.blob(keyCount.length, 'keyCount'),\n BufferLayout.seq(Layout.publicKey('key'), numKeys, 'keys'),\n Layout.publicKey('recentBlockhash'),\n ]);\n\n const transaction = {\n numRequiredSignatures: Buffer.from([this.header.numRequiredSignatures]),\n numReadonlySignedAccounts: Buffer.from([\n this.header.numReadonlySignedAccounts,\n ]),\n numReadonlyUnsignedAccounts: Buffer.from([\n this.header.numReadonlyUnsignedAccounts,\n ]),\n keyCount: Buffer.from(keyCount),\n keys: this.accountKeys.map(key => toBuffer(key.toBytes())),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n };\n\n let signData = Buffer.alloc(2048);\n const length = signDataLayout.encode(transaction, signData);\n instructionBuffer.copy(signData, length);\n return signData.slice(0, length + instructionBuffer.length);\n }\n\n /**\n * Decode a compiled message into a Message object.\n */\n static from(buffer: Buffer | Uint8Array | Array): Message {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const numRequiredSignatures = guardedShift(byteArray);\n if (\n numRequiredSignatures !==\n (numRequiredSignatures & VERSION_PREFIX_MASK)\n ) {\n throw new Error(\n 'Versioned messages must be deserialized with VersionedMessage.deserialize()',\n );\n }\n\n const numReadonlySignedAccounts = guardedShift(byteArray);\n const numReadonlyUnsignedAccounts = guardedShift(byteArray);\n\n const accountCount = shortvec.decodeLength(byteArray);\n let accountKeys = [];\n for (let i = 0; i < accountCount; i++) {\n const account = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n accountKeys.push(new PublicKey(Buffer.from(account)));\n }\n\n const recentBlockhash = guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH);\n\n const instructionCount = shortvec.decodeLength(byteArray);\n let instructions: CompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountCount = shortvec.decodeLength(byteArray);\n const accounts = guardedSplice(byteArray, 0, accountCount);\n const dataLength = shortvec.decodeLength(byteArray);\n const dataSlice = guardedSplice(byteArray, 0, dataLength);\n const data = bs58.encode(Buffer.from(dataSlice));\n instructions.push({\n programIdIndex,\n accounts,\n data,\n });\n }\n\n const messageArgs = {\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n recentBlockhash: bs58.encode(Buffer.from(recentBlockhash)),\n accountKeys,\n instructions,\n };\n\n return new Message(messageArgs);\n }\n}\n","import bs58 from 'bs58';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from '../layout';\nimport {Blockhash} from '../blockhash';\nimport {\n MessageHeader,\n MessageAddressTableLookup,\n MessageCompiledInstruction,\n} from './index';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport assert from '../utils/assert';\nimport {PACKET_DATA_SIZE, VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {TransactionInstruction} from '../transaction';\nimport {AddressLookupTableAccount} from '../programs';\nimport {CompiledKeys} from './compiled-keys';\nimport {AccountKeysFromLookups, MessageAccountKeys} from './account-keys';\nimport {guardedShift, guardedSplice} from '../utils/guarded-array-utils';\n\n/**\n * Message constructor arguments\n */\nexport type MessageV0Args = {\n /** The message header, identifying signed and read-only `accountKeys` */\n header: MessageHeader;\n /** The static account keys used by this transaction */\n staticAccountKeys: PublicKey[];\n /** The hash of a recent ledger block */\n recentBlockhash: Blockhash;\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n compiledInstructions: MessageCompiledInstruction[];\n /** Instructions that will be executed in sequence and committed in one atomic transaction if all succeed. */\n addressTableLookups: MessageAddressTableLookup[];\n};\n\nexport type CompileV0Args = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n addressLookupTableAccounts?: Array;\n};\n\nexport type GetAccountKeysArgs =\n | {\n accountKeysFromLookups?: AccountKeysFromLookups | null;\n }\n | {\n addressLookupTableAccounts?: AddressLookupTableAccount[] | null;\n };\n\nexport class MessageV0 {\n header: MessageHeader;\n staticAccountKeys: Array;\n recentBlockhash: Blockhash;\n compiledInstructions: Array;\n addressTableLookups: Array;\n\n constructor(args: MessageV0Args) {\n this.header = args.header;\n this.staticAccountKeys = args.staticAccountKeys;\n this.recentBlockhash = args.recentBlockhash;\n this.compiledInstructions = args.compiledInstructions;\n this.addressTableLookups = args.addressTableLookups;\n }\n\n get version(): 0 {\n return 0;\n }\n\n get numAccountKeysFromLookups(): number {\n let count = 0;\n for (const lookup of this.addressTableLookups) {\n count += lookup.readonlyIndexes.length + lookup.writableIndexes.length;\n }\n return count;\n }\n\n getAccountKeys(args?: GetAccountKeysArgs): MessageAccountKeys {\n let accountKeysFromLookups: AccountKeysFromLookups | undefined;\n if (\n args &&\n 'accountKeysFromLookups' in args &&\n args.accountKeysFromLookups\n ) {\n if (\n this.numAccountKeysFromLookups !=\n args.accountKeysFromLookups.writable.length +\n args.accountKeysFromLookups.readonly.length\n ) {\n throw new Error(\n 'Failed to get account keys because of a mismatch in the number of account keys from lookups',\n );\n }\n accountKeysFromLookups = args.accountKeysFromLookups;\n } else if (\n args &&\n 'addressLookupTableAccounts' in args &&\n args.addressLookupTableAccounts\n ) {\n accountKeysFromLookups = this.resolveAddressTableLookups(\n args.addressLookupTableAccounts,\n );\n } else if (this.addressTableLookups.length > 0) {\n throw new Error(\n 'Failed to get account keys because address table lookups were not resolved',\n );\n }\n return new MessageAccountKeys(\n this.staticAccountKeys,\n accountKeysFromLookups,\n );\n }\n\n isAccountSigner(index: number): boolean {\n return index < this.header.numRequiredSignatures;\n }\n\n isAccountWritable(index: number): boolean {\n const numSignedAccounts = this.header.numRequiredSignatures;\n const numStaticAccountKeys = this.staticAccountKeys.length;\n if (index >= numStaticAccountKeys) {\n const lookupAccountKeysIndex = index - numStaticAccountKeys;\n const numWritableLookupAccountKeys = this.addressTableLookups.reduce(\n (count, lookup) => count + lookup.writableIndexes.length,\n 0,\n );\n return lookupAccountKeysIndex < numWritableLookupAccountKeys;\n } else if (index >= this.header.numRequiredSignatures) {\n const unsignedAccountIndex = index - numSignedAccounts;\n const numUnsignedAccounts = numStaticAccountKeys - numSignedAccounts;\n const numWritableUnsignedAccounts =\n numUnsignedAccounts - this.header.numReadonlyUnsignedAccounts;\n return unsignedAccountIndex < numWritableUnsignedAccounts;\n } else {\n const numWritableSignedAccounts =\n numSignedAccounts - this.header.numReadonlySignedAccounts;\n return index < numWritableSignedAccounts;\n }\n }\n\n resolveAddressTableLookups(\n addressLookupTableAccounts: AddressLookupTableAccount[],\n ): AccountKeysFromLookups {\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: [],\n readonly: [],\n };\n\n for (const tableLookup of this.addressTableLookups) {\n const tableAccount = addressLookupTableAccounts.find(account =>\n account.key.equals(tableLookup.accountKey),\n );\n if (!tableAccount) {\n throw new Error(\n `Failed to find address lookup table account for table key ${tableLookup.accountKey.toBase58()}`,\n );\n }\n\n for (const index of tableLookup.writableIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.writable.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n\n for (const index of tableLookup.readonlyIndexes) {\n if (index < tableAccount.state.addresses.length) {\n accountKeysFromLookups.readonly.push(\n tableAccount.state.addresses[index],\n );\n } else {\n throw new Error(\n `Failed to find address for index ${index} in address lookup table ${tableLookup.accountKey.toBase58()}`,\n );\n }\n }\n }\n\n return accountKeysFromLookups;\n }\n\n static compile(args: CompileV0Args): MessageV0 {\n const compiledKeys = CompiledKeys.compile(args.instructions, args.payerKey);\n\n const addressTableLookups = new Array();\n const accountKeysFromLookups: AccountKeysFromLookups = {\n writable: new Array(),\n readonly: new Array(),\n };\n const lookupTableAccounts = args.addressLookupTableAccounts || [];\n for (const lookupTable of lookupTableAccounts) {\n const extractResult = compiledKeys.extractTableLookup(lookupTable);\n if (extractResult !== undefined) {\n const [addressTableLookup, {writable, readonly}] = extractResult;\n addressTableLookups.push(addressTableLookup);\n accountKeysFromLookups.writable.push(...writable);\n accountKeysFromLookups.readonly.push(...readonly);\n }\n }\n\n const [header, staticAccountKeys] = compiledKeys.getMessageComponents();\n const accountKeys = new MessageAccountKeys(\n staticAccountKeys,\n accountKeysFromLookups,\n );\n const compiledInstructions = accountKeys.compileInstructions(\n args.instructions,\n );\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash: args.recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n\n serialize(): Uint8Array {\n const encodedStaticAccountKeysLength = Array();\n shortvec.encodeLength(\n encodedStaticAccountKeysLength,\n this.staticAccountKeys.length,\n );\n\n const serializedInstructions = this.serializeInstructions();\n const encodedInstructionsLength = Array();\n shortvec.encodeLength(\n encodedInstructionsLength,\n this.compiledInstructions.length,\n );\n\n const serializedAddressTableLookups = this.serializeAddressTableLookups();\n const encodedAddressTableLookupsLength = Array();\n shortvec.encodeLength(\n encodedAddressTableLookupsLength,\n this.addressTableLookups.length,\n );\n\n const messageLayout = BufferLayout.struct<{\n prefix: number;\n header: MessageHeader;\n staticAccountKeysLength: Uint8Array;\n staticAccountKeys: Array;\n recentBlockhash: Uint8Array;\n instructionsLength: Uint8Array;\n serializedInstructions: Uint8Array;\n addressTableLookupsLength: Uint8Array;\n serializedAddressTableLookups: Uint8Array;\n }>([\n BufferLayout.u8('prefix'),\n BufferLayout.struct(\n [\n BufferLayout.u8('numRequiredSignatures'),\n BufferLayout.u8('numReadonlySignedAccounts'),\n BufferLayout.u8('numReadonlyUnsignedAccounts'),\n ],\n 'header',\n ),\n BufferLayout.blob(\n encodedStaticAccountKeysLength.length,\n 'staticAccountKeysLength',\n ),\n BufferLayout.seq(\n Layout.publicKey(),\n this.staticAccountKeys.length,\n 'staticAccountKeys',\n ),\n Layout.publicKey('recentBlockhash'),\n BufferLayout.blob(encodedInstructionsLength.length, 'instructionsLength'),\n BufferLayout.blob(\n serializedInstructions.length,\n 'serializedInstructions',\n ),\n BufferLayout.blob(\n encodedAddressTableLookupsLength.length,\n 'addressTableLookupsLength',\n ),\n BufferLayout.blob(\n serializedAddressTableLookups.length,\n 'serializedAddressTableLookups',\n ),\n ]);\n\n const serializedMessage = new Uint8Array(PACKET_DATA_SIZE);\n const MESSAGE_VERSION_0_PREFIX = 1 << 7;\n const serializedMessageLength = messageLayout.encode(\n {\n prefix: MESSAGE_VERSION_0_PREFIX,\n header: this.header,\n staticAccountKeysLength: new Uint8Array(encodedStaticAccountKeysLength),\n staticAccountKeys: this.staticAccountKeys.map(key => key.toBytes()),\n recentBlockhash: bs58.decode(this.recentBlockhash),\n instructionsLength: new Uint8Array(encodedInstructionsLength),\n serializedInstructions,\n addressTableLookupsLength: new Uint8Array(\n encodedAddressTableLookupsLength,\n ),\n serializedAddressTableLookups,\n },\n serializedMessage,\n );\n return serializedMessage.slice(0, serializedMessageLength);\n }\n\n private serializeInstructions(): Uint8Array {\n let serializedLength = 0;\n const serializedInstructions = new Uint8Array(PACKET_DATA_SIZE);\n for (const instruction of this.compiledInstructions) {\n const encodedAccountKeyIndexesLength = Array();\n shortvec.encodeLength(\n encodedAccountKeyIndexesLength,\n instruction.accountKeyIndexes.length,\n );\n\n const encodedDataLength = Array();\n shortvec.encodeLength(encodedDataLength, instruction.data.length);\n\n const instructionLayout = BufferLayout.struct<{\n programIdIndex: number;\n encodedAccountKeyIndexesLength: Uint8Array;\n accountKeyIndexes: number[];\n encodedDataLength: Uint8Array;\n data: Uint8Array;\n }>([\n BufferLayout.u8('programIdIndex'),\n BufferLayout.blob(\n encodedAccountKeyIndexesLength.length,\n 'encodedAccountKeyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n instruction.accountKeyIndexes.length,\n 'accountKeyIndexes',\n ),\n BufferLayout.blob(encodedDataLength.length, 'encodedDataLength'),\n BufferLayout.blob(instruction.data.length, 'data'),\n ]);\n\n serializedLength += instructionLayout.encode(\n {\n programIdIndex: instruction.programIdIndex,\n encodedAccountKeyIndexesLength: new Uint8Array(\n encodedAccountKeyIndexesLength,\n ),\n accountKeyIndexes: instruction.accountKeyIndexes,\n encodedDataLength: new Uint8Array(encodedDataLength),\n data: instruction.data,\n },\n serializedInstructions,\n serializedLength,\n );\n }\n\n return serializedInstructions.slice(0, serializedLength);\n }\n\n private serializeAddressTableLookups(): Uint8Array {\n let serializedLength = 0;\n const serializedAddressTableLookups = new Uint8Array(PACKET_DATA_SIZE);\n for (const lookup of this.addressTableLookups) {\n const encodedWritableIndexesLength = Array();\n shortvec.encodeLength(\n encodedWritableIndexesLength,\n lookup.writableIndexes.length,\n );\n\n const encodedReadonlyIndexesLength = Array();\n shortvec.encodeLength(\n encodedReadonlyIndexesLength,\n lookup.readonlyIndexes.length,\n );\n\n const addressTableLookupLayout = BufferLayout.struct<{\n accountKey: Uint8Array;\n encodedWritableIndexesLength: Uint8Array;\n writableIndexes: number[];\n encodedReadonlyIndexesLength: Uint8Array;\n readonlyIndexes: number[];\n }>([\n Layout.publicKey('accountKey'),\n BufferLayout.blob(\n encodedWritableIndexesLength.length,\n 'encodedWritableIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.writableIndexes.length,\n 'writableIndexes',\n ),\n BufferLayout.blob(\n encodedReadonlyIndexesLength.length,\n 'encodedReadonlyIndexesLength',\n ),\n BufferLayout.seq(\n BufferLayout.u8(),\n lookup.readonlyIndexes.length,\n 'readonlyIndexes',\n ),\n ]);\n\n serializedLength += addressTableLookupLayout.encode(\n {\n accountKey: lookup.accountKey.toBytes(),\n encodedWritableIndexesLength: new Uint8Array(\n encodedWritableIndexesLength,\n ),\n writableIndexes: lookup.writableIndexes,\n encodedReadonlyIndexesLength: new Uint8Array(\n encodedReadonlyIndexesLength,\n ),\n readonlyIndexes: lookup.readonlyIndexes,\n },\n serializedAddressTableLookups,\n serializedLength,\n );\n }\n\n return serializedAddressTableLookups.slice(0, serializedLength);\n }\n\n static deserialize(serializedMessage: Uint8Array): MessageV0 {\n let byteArray = [...serializedMessage];\n\n const prefix = guardedShift(byteArray);\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n assert(\n prefix !== maskedPrefix,\n `Expected versioned message but received legacy message`,\n );\n\n const version = maskedPrefix;\n assert(\n version === 0,\n `Expected versioned message with version 0 but found version ${version}`,\n );\n\n const header: MessageHeader = {\n numRequiredSignatures: guardedShift(byteArray),\n numReadonlySignedAccounts: guardedShift(byteArray),\n numReadonlyUnsignedAccounts: guardedShift(byteArray),\n };\n\n const staticAccountKeys = [];\n const staticAccountKeysLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < staticAccountKeysLength; i++) {\n staticAccountKeys.push(\n new PublicKey(guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH)),\n );\n }\n\n const recentBlockhash = bs58.encode(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n\n const instructionCount = shortvec.decodeLength(byteArray);\n const compiledInstructions: MessageCompiledInstruction[] = [];\n for (let i = 0; i < instructionCount; i++) {\n const programIdIndex = guardedShift(byteArray);\n const accountKeyIndexesLength = shortvec.decodeLength(byteArray);\n const accountKeyIndexes = guardedSplice(\n byteArray,\n 0,\n accountKeyIndexesLength,\n );\n const dataLength = shortvec.decodeLength(byteArray);\n const data = new Uint8Array(guardedSplice(byteArray, 0, dataLength));\n compiledInstructions.push({\n programIdIndex,\n accountKeyIndexes,\n data,\n });\n }\n\n const addressTableLookupsCount = shortvec.decodeLength(byteArray);\n const addressTableLookups: MessageAddressTableLookup[] = [];\n for (let i = 0; i < addressTableLookupsCount; i++) {\n const accountKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const writableIndexesLength = shortvec.decodeLength(byteArray);\n const writableIndexes = guardedSplice(\n byteArray,\n 0,\n writableIndexesLength,\n );\n const readonlyIndexesLength = shortvec.decodeLength(byteArray);\n const readonlyIndexes = guardedSplice(\n byteArray,\n 0,\n readonlyIndexesLength,\n );\n addressTableLookups.push({\n accountKey,\n writableIndexes,\n readonlyIndexes,\n });\n }\n\n return new MessageV0({\n header,\n staticAccountKeys,\n recentBlockhash,\n compiledInstructions,\n addressTableLookups,\n });\n }\n}\n","import {VERSION_PREFIX_MASK} from '../transaction/constants';\nimport {Message} from './legacy';\nimport {MessageV0} from './v0';\n\nexport type VersionedMessage = Message | MessageV0;\n// eslint-disable-next-line no-redeclare\nexport const VersionedMessage = {\n deserializeMessageVersion(serializedMessage: Uint8Array): 'legacy' | number {\n const prefix = serializedMessage[0];\n const maskedPrefix = prefix & VERSION_PREFIX_MASK;\n\n // if the highest bit of the prefix is not set, the message is not versioned\n if (maskedPrefix === prefix) {\n return 'legacy';\n }\n\n // the lower 7 bits of the prefix indicate the message version\n return maskedPrefix;\n },\n\n deserialize: (serializedMessage: Uint8Array): VersionedMessage => {\n const version =\n VersionedMessage.deserializeMessageVersion(serializedMessage);\n if (version === 'legacy') {\n return Message.from(serializedMessage);\n }\n\n if (version === 0) {\n return MessageV0.deserialize(serializedMessage);\n } else {\n throw new Error(\n `Transaction message version ${version} deserialization is not supported`,\n );\n }\n },\n};\n","import bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n\nimport {PACKET_DATA_SIZE, SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport {Connection} from '../connection';\nimport {Message} from '../message';\nimport {PublicKey} from '../publickey';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport {toBuffer} from '../utils/to-buffer';\nimport invariant from '../utils/assert';\nimport type {Signer} from '../keypair';\nimport type {Blockhash} from '../blockhash';\nimport type {CompiledInstruction} from '../message';\nimport {sign, verify} from '../utils/ed25519';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\n/** @internal */\ntype MessageSignednessErrors = {\n invalid?: PublicKey[];\n missing?: PublicKey[];\n};\n\n/**\n * Transaction signature as base-58 encoded string\n */\nexport type TransactionSignature = string;\n\nexport const enum TransactionStatus {\n BLOCKHEIGHT_EXCEEDED,\n PROCESSED,\n TIMED_OUT,\n NONCE_INVALID,\n}\n\n/**\n * Default (empty) signature\n */\nconst DEFAULT_SIGNATURE = Buffer.alloc(SIGNATURE_LENGTH_IN_BYTES).fill(0);\n\n/**\n * Account metadata used to define instructions\n */\nexport type AccountMeta = {\n /** An account's public key */\n pubkey: PublicKey;\n /** True if an instruction requires a transaction signature matching `pubkey` */\n isSigner: boolean;\n /** True if the `pubkey` can be loaded as a read-write account. */\n isWritable: boolean;\n};\n\n/**\n * List of TransactionInstruction object fields that may be initialized at construction\n */\nexport type TransactionInstructionCtorFields = {\n keys: Array;\n programId: PublicKey;\n data?: Buffer;\n};\n\n/**\n * Configuration object for Transaction.serialize()\n */\nexport type SerializeConfig = {\n /** Require all transaction signatures be present (default: true) */\n requireAllSignatures?: boolean;\n /** Verify provided signatures (default: true) */\n verifySignatures?: boolean;\n};\n\n/**\n * @internal\n */\nexport interface TransactionInstructionJSON {\n keys: {\n pubkey: string;\n isSigner: boolean;\n isWritable: boolean;\n }[];\n programId: string;\n data: number[];\n}\n\n/**\n * Transaction Instruction class\n */\nexport class TransactionInstruction {\n /**\n * Public keys to include in this transaction\n * Boolean represents whether this pubkey needs to sign the transaction\n */\n keys: Array;\n\n /**\n * Program Id to execute\n */\n programId: PublicKey;\n\n /**\n * Program input\n */\n data: Buffer = Buffer.alloc(0);\n\n constructor(opts: TransactionInstructionCtorFields) {\n this.programId = opts.programId;\n this.keys = opts.keys;\n if (opts.data) {\n this.data = opts.data;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionInstructionJSON {\n return {\n keys: this.keys.map(({pubkey, isSigner, isWritable}) => ({\n pubkey: pubkey.toJSON(),\n isSigner,\n isWritable,\n })),\n programId: this.programId.toJSON(),\n data: [...this.data],\n };\n }\n}\n\n/**\n * Pair of signature and corresponding public key\n */\nexport type SignaturePubkeyPair = {\n signature: Buffer | null;\n publicKey: PublicKey;\n};\n\n/**\n * List of Transaction object fields that may be initialized at construction\n */\nexport type TransactionCtorFields_DEPRECATED = {\n /** Optional nonce information used for offline nonce'd transactions */\n nonceInfo?: NonceInformation | null;\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n recentBlockhash?: Blockhash;\n};\n\n// For backward compatibility; an unfortunate consequence of being\n// forced to over-export types by the documentation generator.\n// See https://github.com/solana-labs/solana/pull/25820\nexport type TransactionCtorFields = TransactionCtorFields_DEPRECATED;\n\n/**\n * Blockhash-based transactions have a lifetime that are defined by\n * the blockhash they include. Any transaction whose blockhash is\n * too old will be rejected.\n */\nexport type TransactionBlockhashCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n /** One or more signatures */\n signatures?: Array;\n /** A recent blockhash */\n blockhash: Blockhash;\n /** the last block chain can advance to before tx is declared expired */\n lastValidBlockHeight: number;\n};\n\n/**\n * Use these options to construct a durable nonce transaction.\n */\nexport type TransactionNonceCtor = {\n /** The transaction fee payer */\n feePayer?: PublicKey | null;\n minContextSlot: number;\n nonceInfo: NonceInformation;\n /** One or more signatures */\n signatures?: Array;\n};\n\n/**\n * Nonce information to be used to build an offline Transaction.\n */\nexport type NonceInformation = {\n /** The current blockhash stored in the nonce */\n nonce: Blockhash;\n /** AdvanceNonceAccount Instruction */\n nonceInstruction: TransactionInstruction;\n};\n\n/**\n * @internal\n */\nexport interface TransactionJSON {\n recentBlockhash: string | null;\n feePayer: string | null;\n nonceInfo: {\n nonce: string;\n nonceInstruction: TransactionInstructionJSON;\n } | null;\n instructions: TransactionInstructionJSON[];\n signers: string[];\n}\n\n/**\n * Transaction class\n */\nexport class Transaction {\n /**\n * Signatures for the transaction. Typically created by invoking the\n * `sign()` method\n */\n signatures: Array = [];\n\n /**\n * The first (payer) Transaction signature\n *\n * @returns {Buffer | null} Buffer of payer's signature\n */\n get signature(): Buffer | null {\n if (this.signatures.length > 0) {\n return this.signatures[0].signature;\n }\n return null;\n }\n\n /**\n * The transaction fee payer\n */\n feePayer?: PublicKey;\n\n /**\n * The instructions to atomically execute\n */\n instructions: Array = [];\n\n /**\n * A recent transaction id. Must be populated by the caller\n */\n recentBlockhash?: Blockhash;\n\n /**\n * the last block chain can advance to before tx is declared expired\n * */\n lastValidBlockHeight?: number;\n\n /**\n * Optional Nonce information. If populated, transaction will use a durable\n * Nonce hash instead of a recentBlockhash. Must be populated by the caller\n */\n nonceInfo?: NonceInformation;\n\n /**\n * If this is a nonce transaction this represents the minimum slot from which\n * to evaluate if the nonce has advanced when attempting to confirm the\n * transaction. This protects against a case where the transaction confirmation\n * logic loads the nonce account from an old slot and assumes the mismatch in\n * nonce value implies that the nonce has been advanced.\n */\n minNonceContextSlot?: number;\n\n /**\n * @internal\n */\n _message?: Message;\n\n /**\n * @internal\n */\n _json?: TransactionJSON;\n\n // Construct a transaction with a blockhash and lastValidBlockHeight\n constructor(opts?: TransactionBlockhashCtor);\n\n // Construct a transaction using a durable nonce\n constructor(opts?: TransactionNonceCtor);\n\n /**\n * @deprecated `TransactionCtorFields` has been deprecated and will be removed in a future version.\n * Please supply a `TransactionBlockhashCtor` instead.\n */\n constructor(opts?: TransactionCtorFields_DEPRECATED);\n\n /**\n * Construct an empty Transaction\n */\n constructor(\n opts?:\n | TransactionBlockhashCtor\n | TransactionNonceCtor\n | TransactionCtorFields_DEPRECATED,\n ) {\n if (!opts) {\n return;\n }\n if (opts.feePayer) {\n this.feePayer = opts.feePayer;\n }\n if (opts.signatures) {\n this.signatures = opts.signatures;\n }\n if (Object.prototype.hasOwnProperty.call(opts, 'nonceInfo')) {\n const {minContextSlot, nonceInfo} = opts as TransactionNonceCtor;\n this.minNonceContextSlot = minContextSlot;\n this.nonceInfo = nonceInfo;\n } else if (\n Object.prototype.hasOwnProperty.call(opts, 'lastValidBlockHeight')\n ) {\n const {blockhash, lastValidBlockHeight} =\n opts as TransactionBlockhashCtor;\n this.recentBlockhash = blockhash;\n this.lastValidBlockHeight = lastValidBlockHeight;\n } else {\n const {recentBlockhash, nonceInfo} =\n opts as TransactionCtorFields_DEPRECATED;\n if (nonceInfo) {\n this.nonceInfo = nonceInfo;\n }\n this.recentBlockhash = recentBlockhash;\n }\n }\n\n /**\n * @internal\n */\n toJSON(): TransactionJSON {\n return {\n recentBlockhash: this.recentBlockhash || null,\n feePayer: this.feePayer ? this.feePayer.toJSON() : null,\n nonceInfo: this.nonceInfo\n ? {\n nonce: this.nonceInfo.nonce,\n nonceInstruction: this.nonceInfo.nonceInstruction.toJSON(),\n }\n : null,\n instructions: this.instructions.map(instruction => instruction.toJSON()),\n signers: this.signatures.map(({publicKey}) => {\n return publicKey.toJSON();\n }),\n };\n }\n\n /**\n * Add one or more instructions to this Transaction\n *\n * @param {Array< Transaction | TransactionInstruction | TransactionInstructionCtorFields >} items - Instructions to add to the Transaction\n */\n add(\n ...items: Array<\n Transaction | TransactionInstruction | TransactionInstructionCtorFields\n >\n ): Transaction {\n if (items.length === 0) {\n throw new Error('No instructions');\n }\n\n items.forEach((item: any) => {\n if ('instructions' in item) {\n this.instructions = this.instructions.concat(item.instructions);\n } else if ('data' in item && 'programId' in item && 'keys' in item) {\n this.instructions.push(item);\n } else {\n this.instructions.push(new TransactionInstruction(item));\n }\n });\n return this;\n }\n\n /**\n * Compile transaction data\n */\n compileMessage(): Message {\n if (\n this._message &&\n JSON.stringify(this.toJSON()) === JSON.stringify(this._json)\n ) {\n return this._message;\n }\n\n let recentBlockhash;\n let instructions: TransactionInstruction[];\n if (this.nonceInfo) {\n recentBlockhash = this.nonceInfo.nonce;\n if (this.instructions[0] != this.nonceInfo.nonceInstruction) {\n instructions = [this.nonceInfo.nonceInstruction, ...this.instructions];\n } else {\n instructions = this.instructions;\n }\n } else {\n recentBlockhash = this.recentBlockhash;\n instructions = this.instructions;\n }\n if (!recentBlockhash) {\n throw new Error('Transaction recentBlockhash required');\n }\n\n if (instructions.length < 1) {\n console.warn('No instructions provided');\n }\n\n let feePayer: PublicKey;\n if (this.feePayer) {\n feePayer = this.feePayer;\n } else if (this.signatures.length > 0 && this.signatures[0].publicKey) {\n // Use implicit fee payer\n feePayer = this.signatures[0].publicKey;\n } else {\n throw new Error('Transaction fee payer required');\n }\n\n for (let i = 0; i < instructions.length; i++) {\n if (instructions[i].programId === undefined) {\n throw new Error(\n `Transaction instruction index ${i} has undefined program id`,\n );\n }\n }\n\n const programIds: string[] = [];\n const accountMetas: AccountMeta[] = [];\n instructions.forEach(instruction => {\n instruction.keys.forEach(accountMeta => {\n accountMetas.push({...accountMeta});\n });\n\n const programId = instruction.programId.toString();\n if (!programIds.includes(programId)) {\n programIds.push(programId);\n }\n });\n\n // Append programID account metas\n programIds.forEach(programId => {\n accountMetas.push({\n pubkey: new PublicKey(programId),\n isSigner: false,\n isWritable: false,\n });\n });\n\n // Cull duplicate account metas\n const uniqueMetas: AccountMeta[] = [];\n accountMetas.forEach(accountMeta => {\n const pubkeyString = accountMeta.pubkey.toString();\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.toString() === pubkeyString;\n });\n if (uniqueIndex > -1) {\n uniqueMetas[uniqueIndex].isWritable =\n uniqueMetas[uniqueIndex].isWritable || accountMeta.isWritable;\n uniqueMetas[uniqueIndex].isSigner =\n uniqueMetas[uniqueIndex].isSigner || accountMeta.isSigner;\n } else {\n uniqueMetas.push(accountMeta);\n }\n });\n\n // Sort. Prioritizing first by signer, then by writable\n uniqueMetas.sort(function (x, y) {\n if (x.isSigner !== y.isSigner) {\n // Signers always come before non-signers\n return x.isSigner ? -1 : 1;\n }\n if (x.isWritable !== y.isWritable) {\n // Writable accounts always come before read-only accounts\n return x.isWritable ? -1 : 1;\n }\n // Otherwise, sort by pubkey, stringwise.\n const options = {\n localeMatcher: 'best fit',\n usage: 'sort',\n sensitivity: 'variant',\n ignorePunctuation: false,\n numeric: false,\n caseFirst: 'lower',\n } as Intl.CollatorOptions;\n return x.pubkey\n .toBase58()\n .localeCompare(y.pubkey.toBase58(), 'en', options);\n });\n\n // Move fee payer to the front\n const feePayerIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(feePayer);\n });\n if (feePayerIndex > -1) {\n const [payerMeta] = uniqueMetas.splice(feePayerIndex, 1);\n payerMeta.isSigner = true;\n payerMeta.isWritable = true;\n uniqueMetas.unshift(payerMeta);\n } else {\n uniqueMetas.unshift({\n pubkey: feePayer,\n isSigner: true,\n isWritable: true,\n });\n }\n\n // Disallow unknown signers\n for (const signature of this.signatures) {\n const uniqueIndex = uniqueMetas.findIndex(x => {\n return x.pubkey.equals(signature.publicKey);\n });\n if (uniqueIndex > -1) {\n if (!uniqueMetas[uniqueIndex].isSigner) {\n uniqueMetas[uniqueIndex].isSigner = true;\n console.warn(\n 'Transaction references a signature that is unnecessary, ' +\n 'only the fee payer and instruction signer accounts should sign a transaction. ' +\n 'This behavior is deprecated and will throw an error in the next major version release.',\n );\n }\n } else {\n throw new Error(`unknown signer: ${signature.publicKey.toString()}`);\n }\n }\n\n let numRequiredSignatures = 0;\n let numReadonlySignedAccounts = 0;\n let numReadonlyUnsignedAccounts = 0;\n\n // Split out signing from non-signing keys and count header values\n const signedKeys: string[] = [];\n const unsignedKeys: string[] = [];\n uniqueMetas.forEach(({pubkey, isSigner, isWritable}) => {\n if (isSigner) {\n signedKeys.push(pubkey.toString());\n numRequiredSignatures += 1;\n if (!isWritable) {\n numReadonlySignedAccounts += 1;\n }\n } else {\n unsignedKeys.push(pubkey.toString());\n if (!isWritable) {\n numReadonlyUnsignedAccounts += 1;\n }\n }\n });\n\n const accountKeys = signedKeys.concat(unsignedKeys);\n const compiledInstructions: CompiledInstruction[] = instructions.map(\n instruction => {\n const {data, programId} = instruction;\n return {\n programIdIndex: accountKeys.indexOf(programId.toString()),\n accounts: instruction.keys.map(meta =>\n accountKeys.indexOf(meta.pubkey.toString()),\n ),\n data: bs58.encode(data),\n };\n },\n );\n\n compiledInstructions.forEach(instruction => {\n invariant(instruction.programIdIndex >= 0);\n instruction.accounts.forEach(keyIndex => invariant(keyIndex >= 0));\n });\n\n return new Message({\n header: {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n },\n accountKeys,\n recentBlockhash,\n instructions: compiledInstructions,\n });\n }\n\n /**\n * @internal\n */\n _compile(): Message {\n const message = this.compileMessage();\n const signedKeys = message.accountKeys.slice(\n 0,\n message.header.numRequiredSignatures,\n );\n\n if (this.signatures.length === signedKeys.length) {\n const valid = this.signatures.every((pair, index) => {\n return signedKeys[index].equals(pair.publicKey);\n });\n\n if (valid) return message;\n }\n\n this.signatures = signedKeys.map(publicKey => ({\n signature: null,\n publicKey,\n }));\n\n return message;\n }\n\n /**\n * Get a buffer of the Transaction data that need to be covered by signatures\n */\n serializeMessage(): Buffer {\n return this._compile().serialize();\n }\n\n /**\n * Get the estimated fee associated with a transaction\n *\n * @param {Connection} connection Connection to RPC Endpoint.\n *\n * @returns {Promise} The estimated fee for the transaction\n */\n async getEstimatedFee(connection: Connection): Promise {\n return (await connection.getFeeForMessage(this.compileMessage())).value;\n }\n\n /**\n * Specify the public keys which will be used to sign the Transaction.\n * The first signer will be used as the transaction fee payer account.\n *\n * Signatures can be added with either `partialSign` or `addSignature`\n *\n * @deprecated Deprecated since v0.84.0. Only the fee payer needs to be\n * specified and it can be set in the Transaction constructor or with the\n * `feePayer` property.\n */\n setSigners(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n const seen = new Set();\n this.signatures = signers\n .filter(publicKey => {\n const key = publicKey.toString();\n if (seen.has(key)) {\n return false;\n } else {\n seen.add(key);\n return true;\n }\n })\n .map(publicKey => ({signature: null, publicKey}));\n }\n\n /**\n * Sign the Transaction with the specified signers. Multiple signatures may\n * be applied to a Transaction. The first signature is considered \"primary\"\n * and is used identify and confirm transactions.\n *\n * If the Transaction `feePayer` is not set, the first signer will be used\n * as the transaction fee payer account.\n *\n * Transaction fields should not be modified after the first call to `sign`,\n * as doing so may invalidate the signature and cause the Transaction to be\n * rejected.\n *\n * The Transaction must be assigned a valid `recentBlockhash` before invoking this method\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n sign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n this.signatures = uniqueSigners.map(signer => ({\n signature: null,\n publicKey: signer.publicKey,\n }));\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * Partially sign a transaction with the specified accounts. All accounts must\n * correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * All the caveats from the `sign` method apply to `partialSign`\n *\n * @param {Array} signers Array of signers that will sign the transaction\n */\n partialSign(...signers: Array) {\n if (signers.length === 0) {\n throw new Error('No signers');\n }\n\n // Dedupe signers\n const seen = new Set();\n const uniqueSigners = [];\n for (const signer of signers) {\n const key = signer.publicKey.toString();\n if (seen.has(key)) {\n continue;\n } else {\n seen.add(key);\n uniqueSigners.push(signer);\n }\n }\n\n const message = this._compile();\n this._partialSign(message, ...uniqueSigners);\n }\n\n /**\n * @internal\n */\n _partialSign(message: Message, ...signers: Array) {\n const signData = message.serialize();\n signers.forEach(signer => {\n const signature = sign(signData, signer.secretKey);\n this._addSignature(signer.publicKey, toBuffer(signature));\n });\n }\n\n /**\n * Add an externally created signature to a transaction. The public key\n * must correspond to either the fee payer or a signer account in the transaction\n * instructions.\n *\n * @param {PublicKey} pubkey Public key that will be added to the transaction.\n * @param {Buffer} signature An externally created signature to add to the transaction.\n */\n addSignature(pubkey: PublicKey, signature: Buffer) {\n this._compile(); // Ensure signatures array is populated\n this._addSignature(pubkey, signature);\n }\n\n /**\n * @internal\n */\n _addSignature(pubkey: PublicKey, signature: Buffer) {\n invariant(signature.length === 64);\n\n const index = this.signatures.findIndex(sigpair =>\n pubkey.equals(sigpair.publicKey),\n );\n if (index < 0) {\n throw new Error(`unknown signer: ${pubkey.toString()}`);\n }\n\n this.signatures[index].signature = Buffer.from(signature);\n }\n\n /**\n * Verify signatures of a Transaction\n * Optional parameter specifies if we're expecting a fully signed Transaction or a partially signed one.\n * If no boolean is provided, we expect a fully signed Transaction by default.\n *\n * @param {boolean} [requireAllSignatures=true] Require a fully signed Transaction\n */\n verifySignatures(requireAllSignatures: boolean = true): boolean {\n const signatureErrors = this._getMessageSignednessErrors(\n this.serializeMessage(),\n requireAllSignatures,\n );\n return !signatureErrors;\n }\n\n /**\n * @internal\n */\n _getMessageSignednessErrors(\n message: Uint8Array,\n requireAllSignatures: boolean,\n ): MessageSignednessErrors | undefined {\n const errors: MessageSignednessErrors = {};\n for (const {signature, publicKey} of this.signatures) {\n if (signature === null) {\n if (requireAllSignatures) {\n (errors.missing ||= []).push(publicKey);\n }\n } else {\n if (!verify(signature, message, publicKey.toBytes())) {\n (errors.invalid ||= []).push(publicKey);\n }\n }\n }\n return errors.invalid || errors.missing ? errors : undefined;\n }\n\n /**\n * Serialize the Transaction in the wire format.\n *\n * @param {Buffer} [config] Config of transaction.\n *\n * @returns {Buffer} Signature of transaction in wire format.\n */\n serialize(config?: SerializeConfig): Buffer {\n const {requireAllSignatures, verifySignatures} = Object.assign(\n {requireAllSignatures: true, verifySignatures: true},\n config,\n );\n\n const signData = this.serializeMessage();\n if (verifySignatures) {\n const sigErrors = this._getMessageSignednessErrors(\n signData,\n requireAllSignatures,\n );\n if (sigErrors) {\n let errorMessage = 'Signature verification failed.';\n if (sigErrors.invalid) {\n errorMessage += `\\nInvalid signature for public key${\n sigErrors.invalid.length === 1 ? '' : '(s)'\n } [\\`${sigErrors.invalid.map(p => p.toBase58()).join('`, `')}\\`].`;\n }\n if (sigErrors.missing) {\n errorMessage += `\\nMissing signature for public key${\n sigErrors.missing.length === 1 ? '' : '(s)'\n } [\\`${sigErrors.missing.map(p => p.toBase58()).join('`, `')}\\`].`;\n }\n throw new Error(errorMessage);\n }\n }\n\n return this._serialize(signData);\n }\n\n /**\n * @internal\n */\n _serialize(signData: Buffer): Buffer {\n const {signatures} = this;\n const signatureCount: number[] = [];\n shortvec.encodeLength(signatureCount, signatures.length);\n const transactionLength =\n signatureCount.length + signatures.length * 64 + signData.length;\n const wireTransaction = Buffer.alloc(transactionLength);\n invariant(signatures.length < 256);\n Buffer.from(signatureCount).copy(wireTransaction, 0);\n signatures.forEach(({signature}, index) => {\n if (signature !== null) {\n invariant(signature.length === 64, `signature has invalid length`);\n Buffer.from(signature).copy(\n wireTransaction,\n signatureCount.length + index * 64,\n );\n }\n });\n signData.copy(\n wireTransaction,\n signatureCount.length + signatures.length * 64,\n );\n invariant(\n wireTransaction.length <= PACKET_DATA_SIZE,\n `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`,\n );\n return wireTransaction;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get keys(): Array {\n invariant(this.instructions.length === 1);\n return this.instructions[0].keys.map(keyObj => keyObj.pubkey);\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get programId(): PublicKey {\n invariant(this.instructions.length === 1);\n return this.instructions[0].programId;\n }\n\n /**\n * Deprecated method\n * @internal\n */\n get data(): Buffer {\n invariant(this.instructions.length === 1);\n return this.instructions[0].data;\n }\n\n /**\n * Parse a wire transaction into a Transaction object.\n *\n * @param {Buffer | Uint8Array | Array} buffer Signature of wire Transaction\n *\n * @returns {Transaction} Transaction associated with the signature\n */\n static from(buffer: Buffer | Uint8Array | Array): Transaction {\n // Slice up wire data\n let byteArray = [...buffer];\n\n const signatureCount = shortvec.decodeLength(byteArray);\n let signatures = [];\n for (let i = 0; i < signatureCount; i++) {\n const signature = guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES);\n signatures.push(bs58.encode(Buffer.from(signature)));\n }\n\n return Transaction.populate(Message.from(byteArray), signatures);\n }\n\n /**\n * Populate Transaction object from message and signatures\n *\n * @param {Message} message Message of transaction\n * @param {Array} signatures List of signatures to assign to the transaction\n *\n * @returns {Transaction} The populated Transaction\n */\n static populate(\n message: Message,\n signatures: Array = [],\n ): Transaction {\n const transaction = new Transaction();\n transaction.recentBlockhash = message.recentBlockhash;\n if (message.header.numRequiredSignatures > 0) {\n transaction.feePayer = message.accountKeys[0];\n }\n signatures.forEach((signature, index) => {\n const sigPubkeyPair = {\n signature:\n signature == bs58.encode(DEFAULT_SIGNATURE)\n ? null\n : bs58.decode(signature),\n publicKey: message.accountKeys[index],\n };\n transaction.signatures.push(sigPubkeyPair);\n });\n\n message.instructions.forEach(instruction => {\n const keys = instruction.accounts.map(account => {\n const pubkey = message.accountKeys[account];\n return {\n pubkey,\n isSigner:\n transaction.signatures.some(\n keyObj => keyObj.publicKey.toString() === pubkey.toString(),\n ) || message.isAccountSigner(account),\n isWritable: message.isAccountWritable(account),\n };\n });\n\n transaction.instructions.push(\n new TransactionInstruction({\n keys,\n programId: message.accountKeys[instruction.programIdIndex],\n data: bs58.decode(instruction.data),\n }),\n );\n });\n\n transaction._message = message;\n transaction._json = transaction.toJSON();\n\n return transaction;\n }\n}\n","import {AccountKeysFromLookups} from '../message/account-keys';\nimport assert from '../utils/assert';\nimport {toBuffer} from '../utils/to-buffer';\nimport {Blockhash} from '../blockhash';\nimport {Message, MessageV0, VersionedMessage} from '../message';\nimport {PublicKey} from '../publickey';\nimport {AddressLookupTableAccount} from '../programs';\nimport {AccountMeta, TransactionInstruction} from './legacy';\n\nexport type TransactionMessageArgs = {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n};\n\nexport type DecompileArgs =\n | {\n accountKeysFromLookups: AccountKeysFromLookups;\n }\n | {\n addressLookupTableAccounts: AddressLookupTableAccount[];\n };\n\nexport class TransactionMessage {\n payerKey: PublicKey;\n instructions: Array;\n recentBlockhash: Blockhash;\n\n constructor(args: TransactionMessageArgs) {\n this.payerKey = args.payerKey;\n this.instructions = args.instructions;\n this.recentBlockhash = args.recentBlockhash;\n }\n\n static decompile(\n message: VersionedMessage,\n args?: DecompileArgs,\n ): TransactionMessage {\n const {header, compiledInstructions, recentBlockhash} = message;\n\n const {\n numRequiredSignatures,\n numReadonlySignedAccounts,\n numReadonlyUnsignedAccounts,\n } = header;\n\n const numWritableSignedAccounts =\n numRequiredSignatures - numReadonlySignedAccounts;\n assert(numWritableSignedAccounts > 0, 'Message header is invalid');\n\n const numWritableUnsignedAccounts =\n message.staticAccountKeys.length -\n numRequiredSignatures -\n numReadonlyUnsignedAccounts;\n assert(numWritableUnsignedAccounts >= 0, 'Message header is invalid');\n\n const accountKeys = message.getAccountKeys(args);\n const payerKey = accountKeys.get(0);\n if (payerKey === undefined) {\n throw new Error(\n 'Failed to decompile message because no account keys were found',\n );\n }\n\n const instructions: TransactionInstruction[] = [];\n for (const compiledIx of compiledInstructions) {\n const keys: AccountMeta[] = [];\n\n for (const keyIndex of compiledIx.accountKeyIndexes) {\n const pubkey = accountKeys.get(keyIndex);\n if (pubkey === undefined) {\n throw new Error(\n `Failed to find key for account key index ${keyIndex}`,\n );\n }\n\n const isSigner = keyIndex < numRequiredSignatures;\n\n let isWritable;\n if (isSigner) {\n isWritable = keyIndex < numWritableSignedAccounts;\n } else if (keyIndex < accountKeys.staticAccountKeys.length) {\n isWritable =\n keyIndex - numRequiredSignatures < numWritableUnsignedAccounts;\n } else {\n isWritable =\n keyIndex - accountKeys.staticAccountKeys.length <\n // accountKeysFromLookups cannot be undefined because we already found a pubkey for this index above\n accountKeys.accountKeysFromLookups!.writable.length;\n }\n\n keys.push({\n pubkey,\n isSigner: keyIndex < header.numRequiredSignatures,\n isWritable,\n });\n }\n\n const programId = accountKeys.get(compiledIx.programIdIndex);\n if (programId === undefined) {\n throw new Error(\n `Failed to find program id for program id index ${compiledIx.programIdIndex}`,\n );\n }\n\n instructions.push(\n new TransactionInstruction({\n programId,\n data: toBuffer(compiledIx.data),\n keys,\n }),\n );\n }\n\n return new TransactionMessage({\n payerKey,\n instructions,\n recentBlockhash,\n });\n }\n\n compileToLegacyMessage(): Message {\n return Message.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n });\n }\n\n compileToV0Message(\n addressLookupTableAccounts?: AddressLookupTableAccount[],\n ): MessageV0 {\n return MessageV0.compile({\n payerKey: this.payerKey,\n recentBlockhash: this.recentBlockhash,\n instructions: this.instructions,\n addressLookupTableAccounts,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {Signer} from '../keypair';\nimport assert from '../utils/assert';\nimport {VersionedMessage} from '../message/versioned';\nimport {SIGNATURE_LENGTH_IN_BYTES} from './constants';\nimport * as shortvec from '../utils/shortvec-encoding';\nimport * as Layout from '../layout';\nimport {sign} from '../utils/ed25519';\nimport {PublicKey} from '../publickey';\nimport {guardedSplice} from '../utils/guarded-array-utils';\n\nexport type TransactionVersion = 'legacy' | 0;\n\n/**\n * Versioned transaction class\n */\nexport class VersionedTransaction {\n signatures: Array;\n message: VersionedMessage;\n\n get version(): TransactionVersion {\n return this.message.version;\n }\n\n constructor(message: VersionedMessage, signatures?: Array) {\n if (signatures !== undefined) {\n assert(\n signatures.length === message.header.numRequiredSignatures,\n 'Expected signatures length to be equal to the number of required signatures',\n );\n this.signatures = signatures;\n } else {\n const defaultSignatures = [];\n for (let i = 0; i < message.header.numRequiredSignatures; i++) {\n defaultSignatures.push(new Uint8Array(SIGNATURE_LENGTH_IN_BYTES));\n }\n this.signatures = defaultSignatures;\n }\n this.message = message;\n }\n\n serialize(): Uint8Array {\n const serializedMessage = this.message.serialize();\n\n const encodedSignaturesLength = Array();\n shortvec.encodeLength(encodedSignaturesLength, this.signatures.length);\n\n const transactionLayout = BufferLayout.struct<{\n encodedSignaturesLength: Uint8Array;\n signatures: Array;\n serializedMessage: Uint8Array;\n }>([\n BufferLayout.blob(\n encodedSignaturesLength.length,\n 'encodedSignaturesLength',\n ),\n BufferLayout.seq(\n Layout.signature(),\n this.signatures.length,\n 'signatures',\n ),\n BufferLayout.blob(serializedMessage.length, 'serializedMessage'),\n ]);\n\n const serializedTransaction = new Uint8Array(2048);\n const serializedTransactionLength = transactionLayout.encode(\n {\n encodedSignaturesLength: new Uint8Array(encodedSignaturesLength),\n signatures: this.signatures,\n serializedMessage,\n },\n serializedTransaction,\n );\n\n return serializedTransaction.slice(0, serializedTransactionLength);\n }\n\n static deserialize(serializedTransaction: Uint8Array): VersionedTransaction {\n let byteArray = [...serializedTransaction];\n\n const signatures = [];\n const signaturesLength = shortvec.decodeLength(byteArray);\n for (let i = 0; i < signaturesLength; i++) {\n signatures.push(\n new Uint8Array(guardedSplice(byteArray, 0, SIGNATURE_LENGTH_IN_BYTES)),\n );\n }\n\n const message = VersionedMessage.deserialize(new Uint8Array(byteArray));\n return new VersionedTransaction(message, signatures);\n }\n\n sign(signers: Array) {\n const messageData = this.message.serialize();\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n for (const signer of signers) {\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(signer.publicKey),\n );\n assert(\n signerIndex >= 0,\n `Cannot sign with non signer key ${signer.publicKey.toBase58()}`,\n );\n this.signatures[signerIndex] = sign(messageData, signer.secretKey);\n }\n }\n\n addSignature(publicKey: PublicKey, signature: Uint8Array) {\n assert(signature.byteLength === 64, 'Signature must be 64 bytes long');\n const signerPubkeys = this.message.staticAccountKeys.slice(\n 0,\n this.message.header.numRequiredSignatures,\n );\n const signerIndex = signerPubkeys.findIndex(pubkey =>\n pubkey.equals(publicKey),\n );\n assert(\n signerIndex >= 0,\n `Can not add signature; \\`${publicKey.toBase58()}\\` is not required to sign this transaction`,\n );\n this.signatures[signerIndex] = signature;\n }\n}\n","// TODO: These constants should be removed in favor of reading them out of a\n// Syscall account\n\n/**\n * @internal\n */\nexport const NUM_TICKS_PER_SECOND = 160;\n\n/**\n * @internal\n */\nexport const DEFAULT_TICKS_PER_SLOT = 64;\n\n/**\n * @internal\n */\nexport const NUM_SLOTS_PER_SECOND =\n NUM_TICKS_PER_SECOND / DEFAULT_TICKS_PER_SLOT;\n\n/**\n * @internal\n */\nexport const MS_PER_SLOT = 1000 / NUM_SLOTS_PER_SECOND;\n","import {PublicKey} from './publickey';\n\nexport const SYSVAR_CLOCK_PUBKEY = new PublicKey(\n 'SysvarC1ock11111111111111111111111111111111',\n);\n\nexport const SYSVAR_EPOCH_SCHEDULE_PUBKEY = new PublicKey(\n 'SysvarEpochSchedu1e111111111111111111111111',\n);\n\nexport const SYSVAR_INSTRUCTIONS_PUBKEY = new PublicKey(\n 'Sysvar1nstructions1111111111111111111111111',\n);\n\nexport const SYSVAR_RECENT_BLOCKHASHES_PUBKEY = new PublicKey(\n 'SysvarRecentB1ockHashes11111111111111111111',\n);\n\nexport const SYSVAR_RENT_PUBKEY = new PublicKey(\n 'SysvarRent111111111111111111111111111111111',\n);\n\nexport const SYSVAR_REWARDS_PUBKEY = new PublicKey(\n 'SysvarRewards111111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HASHES_PUBKEY = new PublicKey(\n 'SysvarS1otHashes111111111111111111111111111',\n);\n\nexport const SYSVAR_SLOT_HISTORY_PUBKEY = new PublicKey(\n 'SysvarS1otHistory11111111111111111111111111',\n);\n\nexport const SYSVAR_STAKE_HISTORY_PUBKEY = new PublicKey(\n 'SysvarStakeHistory1111111111111111111111111',\n);\n","import {Connection} from './connection';\nimport {TransactionSignature} from './transaction';\n\nexport class SendTransactionError extends Error {\n private signature: TransactionSignature;\n private transactionMessage: string;\n private transactionLogs: string[] | Promise | undefined;\n\n constructor({\n action,\n signature,\n transactionMessage,\n logs,\n }: {\n action: 'send' | 'simulate';\n signature: TransactionSignature;\n transactionMessage: string;\n logs?: string[];\n }) {\n const maybeLogsOutput = logs\n ? `Logs: \\n${JSON.stringify(logs.slice(-10), null, 2)}. `\n : '';\n const guideText =\n '\\nCatch the `SendTransactionError` and call `getLogs()` on it for full details.';\n let message: string;\n switch (action) {\n case 'send':\n message =\n `Transaction ${signature} resulted in an error. \\n` +\n `${transactionMessage}. ` +\n maybeLogsOutput +\n guideText;\n break;\n case 'simulate':\n message =\n `Simulation failed. \\nMessage: ${transactionMessage}. \\n` +\n maybeLogsOutput +\n guideText;\n break;\n default: {\n message = `Unknown action '${((a: never) => a)(action)}'`;\n }\n }\n super(message);\n\n this.signature = signature;\n this.transactionMessage = transactionMessage;\n this.transactionLogs = logs ? logs : undefined;\n }\n\n get transactionError(): {message: string; logs?: string[]} {\n return {\n message: this.transactionMessage,\n logs: Array.isArray(this.transactionLogs)\n ? this.transactionLogs\n : undefined,\n };\n }\n\n /* @deprecated Use `await getLogs()` instead */\n get logs(): string[] | undefined {\n const cachedLogs = this.transactionLogs;\n if (\n cachedLogs != null &&\n typeof cachedLogs === 'object' &&\n 'then' in cachedLogs\n ) {\n return undefined;\n }\n return cachedLogs;\n }\n\n async getLogs(connection: Connection): Promise {\n if (!Array.isArray(this.transactionLogs)) {\n this.transactionLogs = new Promise((resolve, reject) => {\n connection\n .getTransaction(this.signature)\n .then(tx => {\n if (tx && tx.meta && tx.meta.logMessages) {\n const logs = tx.meta.logMessages;\n this.transactionLogs = logs;\n resolve(logs);\n } else {\n reject(new Error('Log messages not found'));\n }\n })\n .catch(reject);\n });\n }\n return await this.transactionLogs;\n }\n}\n\n// Keep in sync with client/src/rpc_custom_errors.rs\n// Typescript `enums` thwart tree-shaking. See https://bargsten.org/jsts/enums/\nexport const SolanaJSONRPCErrorCode = {\n JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP: -32001,\n JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE: -32002,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE: -32003,\n JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE: -32004,\n JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY: -32005,\n JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE: -32006,\n JSON_RPC_SERVER_ERROR_SLOT_SKIPPED: -32007,\n JSON_RPC_SERVER_ERROR_NO_SNAPSHOT: -32008,\n JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED: -32009,\n JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX: -32010,\n JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE: -32011,\n JSON_RPC_SCAN_ERROR: -32012,\n JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH: -32013,\n JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET: -32014,\n JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION: -32015,\n JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED: -32016,\n} as const;\nexport type SolanaJSONRPCErrorCodeEnum =\n (typeof SolanaJSONRPCErrorCode)[keyof typeof SolanaJSONRPCErrorCode];\n\nexport class SolanaJSONRPCError extends Error {\n code: SolanaJSONRPCErrorCodeEnum | unknown;\n data?: any;\n constructor(\n {\n code,\n message,\n data,\n }: Readonly<{code: unknown; message: string; data?: any}>,\n customMessage?: string,\n ) {\n super(customMessage != null ? `${customMessage}: ${message}` : message);\n this.code = code;\n this.data = data;\n this.name = 'SolanaJSONRPCError';\n }\n}\n","import {Connection, SignatureResult} from '../connection';\nimport {Transaction} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport type {Signer} from '../keypair';\nimport type {TransactionSignature} from '../transaction';\nimport {SendTransactionError} from '../errors';\n\n/**\n * Sign, send and confirm a transaction.\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Transaction} transaction\n * @param {Array} signers\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmTransaction(\n connection: Connection,\n transaction: Transaction,\n signers: Array,\n options?: ConfirmOptions &\n Readonly<{\n // A signal that, when aborted, cancels any outstanding transaction confirmation operations\n abortSignal?: AbortSignal;\n }>,\n): Promise {\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n maxRetries: options.maxRetries,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendTransaction(\n transaction,\n signers,\n sendOptions,\n );\n\n let status: SignatureResult;\n if (\n transaction.recentBlockhash != null &&\n transaction.lastValidBlockHeight != null\n ) {\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n signature: signature,\n blockhash: transaction.recentBlockhash,\n lastValidBlockHeight: transaction.lastValidBlockHeight,\n },\n options && options.commitment,\n )\n ).value;\n } else if (\n transaction.minNonceContextSlot != null &&\n transaction.nonceInfo != null\n ) {\n const {nonceInstruction} = transaction.nonceInfo;\n const nonceAccountPubkey = nonceInstruction.keys[0].pubkey;\n status = (\n await connection.confirmTransaction(\n {\n abortSignal: options?.abortSignal,\n minContextSlot: transaction.minNonceContextSlot,\n nonceAccountPubkey,\n nonceValue: transaction.nonceInfo.nonce,\n signature,\n },\n options && options.commitment,\n )\n ).value;\n } else {\n if (options?.abortSignal != null) {\n console.warn(\n 'sendAndConfirmTransaction(): A transaction with a deprecated confirmation strategy was ' +\n 'supplied along with an `abortSignal`. Only transactions having `lastValidBlockHeight` ' +\n 'or a combination of `nonceInfo` and `minNonceContextSlot` are abortable.',\n );\n }\n status = (\n await connection.confirmTransaction(\n signature,\n options && options.commitment,\n )\n ).value;\n }\n\n if (status.err) {\n if (signature != null) {\n throw new SendTransactionError({\n action: 'send',\n signature: signature,\n transactionMessage: `Status: (${JSON.stringify(status)})`,\n });\n }\n throw new Error(\n `Transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","// zzz\nexport function sleep(ms: number): Promise {\n return new Promise(resolve => setTimeout(resolve, ms));\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport * as Layout from './layout';\n\nexport interface IInstructionInputData {\n readonly instruction: number;\n}\n\n/**\n * @internal\n */\nexport type InstructionType = {\n /** The Instruction index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Populate a buffer of instruction data using an InstructionType\n * @internal\n */\nexport function encodeData(\n type: InstructionType,\n fields?: any,\n): Buffer {\n const allocLength =\n type.layout.span >= 0 ? type.layout.span : Layout.getAlloc(type, fields);\n const data = Buffer.alloc(allocLength);\n const layoutFields = Object.assign({instruction: type.index}, fields);\n type.layout.encode(layoutFields, data);\n return data;\n}\n\n/**\n * Decode instruction data buffer using an InstructionType\n * @internal\n */\nexport function decodeData(\n type: InstructionType,\n buffer: Buffer,\n): TInputData {\n let data: TInputData;\n try {\n data = type.layout.decode(buffer);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (data.instruction !== type.index) {\n throw new Error(\n `invalid instruction; instruction index mismatch ${data.instruction} != ${type.index}`,\n );\n }\n\n return data;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\n/**\n * https://github.com/solana-labs/solana/blob/90bedd7e067b5b8f3ddbb45da00a4e9cabb22c62/sdk/src/fee_calculator.rs#L7-L11\n *\n * @internal\n */\nexport const FeeCalculatorLayout = BufferLayout.nu64('lamportsPerSignature');\n\n/**\n * Calculator for transaction fees.\n *\n * @deprecated Deprecated since Solana v1.8.0.\n */\nexport interface FeeCalculator {\n /** Cost in lamports to validate a signature. */\n lamportsPerSignature: number;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport type {FeeCalculator} from './fee-calculator';\nimport {FeeCalculatorLayout} from './fee-calculator';\nimport {toBuffer} from './utils/to-buffer';\n\n/**\n * See https://github.com/solana-labs/solana/blob/0ea2843ec9cdc517572b8e62c959f41b55cf4453/sdk/src/nonce_state.rs#L29-L32\n *\n * @internal\n */\nconst NonceAccountLayout = BufferLayout.struct<\n Readonly<{\n authorizedPubkey: Uint8Array;\n feeCalculator: Readonly<{\n lamportsPerSignature: number;\n }>;\n nonce: Uint8Array;\n state: number;\n version: number;\n }>\n>([\n BufferLayout.u32('version'),\n BufferLayout.u32('state'),\n Layout.publicKey('authorizedPubkey'),\n Layout.publicKey('nonce'),\n BufferLayout.struct>(\n [FeeCalculatorLayout],\n 'feeCalculator',\n ),\n]);\n\nexport const NONCE_ACCOUNT_LENGTH = NonceAccountLayout.span;\n\n/**\n * A durable nonce is a 32 byte value encoded as a base58 string.\n */\nexport type DurableNonce = string;\n\ntype NonceAccountArgs = {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n};\n\n/**\n * NonceAccount class\n */\nexport class NonceAccount {\n authorizedPubkey: PublicKey;\n nonce: DurableNonce;\n feeCalculator: FeeCalculator;\n\n /**\n * @internal\n */\n constructor(args: NonceAccountArgs) {\n this.authorizedPubkey = args.authorizedPubkey;\n this.nonce = args.nonce;\n this.feeCalculator = args.feeCalculator;\n }\n\n /**\n * Deserialize NonceAccount from the account data.\n *\n * @param buffer account data\n * @return NonceAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): NonceAccount {\n const nonceAccount = NonceAccountLayout.decode(toBuffer(buffer), 0);\n return new NonceAccount({\n authorizedPubkey: new PublicKey(nonceAccount.authorizedPubkey),\n nonce: new PublicKey(nonceAccount.nonce).toString(),\n feeCalculator: nonceAccount.feeCalculator,\n });\n }\n}\n","// src/codes.ts\nvar SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 1;\nvar SOLANA_ERROR__INVALID_NONCE = 2;\nvar SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 3;\nvar SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE = 4;\nvar SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH = 5;\nvar SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE = 6;\nvar SOLANA_ERROR__MALFORMED_BIGINT_STRING = 7;\nvar SOLANA_ERROR__MALFORMED_NUMBER_STRING = 8;\nvar SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE = 9;\nvar SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR = 10;\nvar SOLANA_ERROR__JSON_RPC__PARSE_ERROR = -32700;\nvar SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR = -32603;\nvar SOLANA_ERROR__JSON_RPC__INVALID_PARAMS = -32602;\nvar SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND = -32601;\nvar SOLANA_ERROR__JSON_RPC__INVALID_REQUEST = -32600;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED = -32016;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION = -32015;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET = -32014;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH = -32013;\nvar SOLANA_ERROR__JSON_RPC__SCAN_ERROR = -32012;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE = -32011;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX = -32010;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED = -32009;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT = -32008;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED = -32007;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE = -32006;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY = -32005;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE = -32004;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE = -32003;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE = -32002;\nvar SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP = -32001;\nvar SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH = 28e5;\nvar SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE = 2800001;\nvar SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS = 2800002;\nvar SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY = 2800003;\nvar SOLANA_ERROR__ADDRESSES__MALFORMED_PDA = 2800004;\nvar SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE = 2800005;\nvar SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED = 2800006;\nvar SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED = 2800007;\nvar SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE = 2800008;\nvar SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED = 2800009;\nvar SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER = 2800010;\nvar SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND = 323e4;\nvar SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND = 32300001;\nvar SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT = 3230002;\nvar SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT = 3230003;\nvar SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED = 3230004;\nvar SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT = 361e4;\nvar SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED = 3610001;\nvar SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED = 3610002;\nvar SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED = 3610003;\nvar SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED = 3610004;\nvar SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED = 3610005;\nvar SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED = 3610006;\nvar SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY = 3610007;\nvar SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED = 3611e3;\nvar SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH = 3704e3;\nvar SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH = 3704001;\nvar SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH = 3704002;\nvar SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE = 3704003;\nvar SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY = 3704004;\nvar SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS = 4128e3;\nvar SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA = 4128001;\nvar SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH = 4128002;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN = 4615e3;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR = 4615001;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT = 4615002;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA = 4615003;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA = 4615004;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL = 4615005;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS = 4615006;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID = 4615007;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE = 4615008;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED = 4615009;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT = 4615010;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION = 4615011;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID = 4615012;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND = 4615013;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED = 4615014;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE = 4615015;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED = 4615016;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX = 4615017;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED = 4615018;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED = 4615019;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS = 4615020;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED = 4615021;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE = 4615022;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED = 4615023;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 4615024;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC = 4615025;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM = 4615026;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR = 4615027;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED = 4615028;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE = 4615029;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT = 4615030;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID = 4615031;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH = 4615032;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT = 4615033;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED = 4615034;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED = 4615035;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS = 4615036;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC = 4615037;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED = 4615038;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION = 4615039;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE = 4615040;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE = 4615041;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE = 4615042;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE = 4615043;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY = 4615044;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR = 4615045;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT = 4615046;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER = 4615047;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW = 4615048;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR = 4615049;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER = 4615050;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED = 4615051;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED = 4615052;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED = 4615053;\nvar SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS = 4615054;\nvar SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS = 5508e3;\nvar SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER = 5508001;\nvar SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER = 5508002;\nvar SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER = 5508003;\nvar SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER = 5508004;\nvar SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER = 5508005;\nvar SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER = 5508006;\nvar SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER = 5508007;\nvar SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER = 5508008;\nvar SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS = 5508009;\nvar SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING = 5508010;\nvar SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED = 5508011;\nvar SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES = 5663e3;\nvar SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE = 5663001;\nvar SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME = 5663002;\nvar SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME = 5663003;\nvar SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE = 5663004;\nvar SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING = 5663005;\nvar SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE = 5663006;\nvar SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND = 5663007;\nvar SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING = 5663008;\nvar SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING = 5663009;\nvar SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING = 5663010;\nvar SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING = 5663011;\nvar SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING = 5663012;\nvar SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING = 5663013;\nvar SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE = 5663014;\nvar SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION = 5663015;\nvar SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES = 5663016;\nvar SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH = 5663017;\nvar SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT = 5663018;\nvar SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT = 5663019;\nvar SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN = 705e4;\nvar SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE = 7050001;\nvar SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE = 7050002;\nvar SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND = 7050003;\nvar SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND = 7050004;\nvar SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE = 7050005;\nvar SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE = 7050006;\nvar SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED = 7050007;\nvar SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND = 7050008;\nvar SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP = 7050009;\nvar SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE = 7050010;\nvar SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX = 7050011;\nvar SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE = 7050012;\nvar SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION = 7050013;\nvar SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE = 7050014;\nvar SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE = 7050015;\nvar SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING = 7050016;\nvar SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT = 7050017;\nvar SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION = 7050018;\nvar SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT = 7050019;\nvar SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT = 7050020;\nvar SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT = 7050021;\nvar SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS = 7050022;\nvar SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND = 7050023;\nvar SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER = 7050024;\nvar SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA = 7050025;\nvar SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX = 7050026;\nvar SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT = 7050027;\nvar SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT = 7050028;\nvar SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT = 7050029;\nvar SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION = 7050030;\nvar SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT = 7050031;\nvar SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED = 7050032;\nvar SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT = 7050033;\nvar SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED = 7050034;\nvar SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED = 7050035;\nvar SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION = 7050036;\nvar SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY = 8078e3;\nvar SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH = 8078001;\nvar SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH = 8078002;\nvar SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH = 8078003;\nvar SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH = 8078004;\nvar SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH = 8078005;\nvar SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH = 8078006;\nvar SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS = 8078007;\nvar SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE = 8078008;\nvar SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT = 8078009;\nvar SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT = 8078010;\nvar SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE = 8078011;\nvar SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE = 8078012;\nvar SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH = 8078013;\nvar SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE = 8078014;\nvar SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT = 8078015;\nvar SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE = 8078016;\nvar SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE = 8078017;\nvar SOLANA_ERROR__CODECS__INVALID_CONSTANT = 8078018;\nvar SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE = 8078019;\nvar SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL = 8078020;\nvar SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES = 8078021;\nvar SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS = 8078022;\nvar SOLANA_ERROR__RPC__INTEGER_OVERFLOW = 81e5;\nvar SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN = 8100001;\nvar SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR = 8100002;\nvar SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD = 8100003;\nvar SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN = 819e4;\nvar SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID = 8190001;\nvar SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED = 8190002;\nvar SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED = 8190003;\nvar SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT = 8190004;\nvar SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING = 99e5;\nvar SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE = 9900001;\nvar SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING = 9900002;\nvar SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE = 9900003;\nvar SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED = 9900004;\n\n// src/context.ts\nfunction encodeValue(value) {\n if (Array.isArray(value)) {\n const commaSeparatedValues = value.map(encodeValue).join(\n \"%2C%20\"\n /* \", \" */\n );\n return \"%5B\" + commaSeparatedValues + /* \"]\" */\n \"%5D\";\n } else if (typeof value === \"bigint\") {\n return `${value}n`;\n } else {\n return encodeURIComponent(\n String(\n value != null && Object.getPrototypeOf(value) === null ? (\n // Plain objects with no prototype don't have a `toString` method.\n // Convert them before stringifying them.\n { ...value }\n ) : value\n )\n );\n }\n}\nfunction encodeObjectContextEntry([key, value]) {\n return `${key}=${encodeValue(value)}`;\n}\nfunction encodeContextObject(context) {\n const searchParamsString = Object.entries(context).map(encodeObjectContextEntry).join(\"&\");\n return btoa(searchParamsString);\n}\n\n// src/messages.ts\nvar SolanaErrorMessages = {\n [SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND]: \"Account not found at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED]: \"Not all accounts were decoded. Encoded accounts found at addresses: $addresses.\",\n [SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT]: \"Expected decoded account at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT]: \"Failed to decode account data at address: $address\",\n [SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND]: \"Accounts not found at addresses: $addresses\",\n [SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED]: \"Unable to find a viable program address bump seed.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS]: \"$putativeAddress is not a base58-encoded address.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH]: \"Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY]: \"The `CryptoKey` must be an `Ed25519` public key.\",\n [SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE]: \"Invalid seeds; point must fall off the Ed25519 curve.\",\n [SOLANA_ERROR__ADDRESSES__MALFORMED_PDA]: \"Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].\",\n [SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED]: \"A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.\",\n [SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED]: \"The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.\",\n [SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE]: \"Expected program derived address bump to be in the range [0, 255], got: $bump.\",\n [SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER]: \"Program address cannot end with PDA marker.\",\n [SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded blockash string of length in the range [32, 44]. Actual length: $actualLength.\",\n [SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: \"The network has progressed past the last block for which this transaction could have been committed.\",\n [SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY]: \"Codec [$codecDescription] cannot decode empty byte arrays.\",\n [SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS]: \"Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.\",\n [SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL]: \"Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH]: \"Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH]: \"Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].\",\n [SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH]: \"Encoder and decoder must either both be fixed-size or variable-size.\",\n [SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE]: \"Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.\",\n [SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH]: \"Expected a fixed-size codec, got a variable-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH]: \"Codec [$codecDescription] expected a positive byte length, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH]: \"Expected a variable-size codec, got a fixed-size one.\",\n [SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE]: \"Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].\",\n [SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH]: \"Codec [$codecDescription] expected $expected bytes, got $bytesLength.\",\n [SOLANA_ERROR__CODECS__INVALID_CONSTANT]: \"Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].\",\n [SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT]: \"Invalid discriminated union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT]: \"Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.\",\n [SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT]: \"Invalid literal union variant. Expected one of [$variants], got $value.\",\n [SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS]: \"Expected [$codecDescription] to have $expected items, got $actual.\",\n [SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE]: \"Invalid value $value for base $base with alphabet $alphabet.\",\n [SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE]: \"Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.\",\n [SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE]: \"Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.\",\n [SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE]: \"Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.\",\n [SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES]: \"Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].\",\n [SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE]: \"Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.\",\n [SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED]: \"No random values implementation could be found.\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED]: \"instruction requires an uninitialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED]: \"instruction tries to borrow reference for an account which is already borrowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"instruction left account with an outstanding borrowed reference\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED]: \"program other than the account's owner changed the size of the account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL]: \"account data too small for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE]: \"instruction expected an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT]: \"An account does not have enough lamports to be rent-exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW]: \"Program arithmetic overflowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR]: \"Failed to serialize or deserialize account data: $encodedData\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS]: \"Builtin programs must consume compute units\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH]: \"Cross-program invocation call depth too deep\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED]: \"Computational budget exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM]: \"custom program error: #$code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX]: \"instruction contains duplicate accounts\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC]: \"instruction modifications of multiply-passed account differ\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT]: \"executable accounts must be rent exempt\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED]: \"instruction changed executable accounts data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE]: \"instruction changed the balance of an executable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED]: \"instruction changed executable bit of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED]: \"instruction modified data of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND]: \"instruction spent from the balance of an account it does not own\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR]: \"generic instruction error\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER]: \"Provided owner is not allowed\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE]: \"Account is immutable\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY]: \"Incorrect authority provided\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID]: \"incorrect program id for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS]: \"insufficient funds for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA]: \"invalid account data for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER]: \"Invalid account owner\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT]: \"invalid program argument\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR]: \"program returned invalid error code\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA]: \"invalid instruction data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC]: \"Failed to reallocate account data\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS]: \"Provided seeds do not result in a valid address\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED]: \"Accounts data allocations exceeded the maximum allowed per transaction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED]: \"Max accounts exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED]: \"Max instruction trace length exceeded\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED]: \"Length of the seed is too long for address generation\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT]: \"An account required by the instruction is missing\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE]: \"missing required signature for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID]: \"instruction illegally modified the program id of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS]: \"insufficient account keys for instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION]: \"Cross-program invocation with unauthorized signer or writable account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE]: \"Failed to create program execution environment\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE]: \"Program failed to compile\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE]: \"Program failed to complete\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED]: \"instruction modified data of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE]: \"instruction changed the balance of a read-only account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED]: \"Cross-program invocation reentrancy not allowed for this instruction\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED]: \"instruction modified rent epoch of an account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION]: \"sum of account balances before and after instruction do not match\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT]: \"instruction requires an initialized account\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN]: \"\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID]: \"Unsupported program id\",\n [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR]: \"Unsupported sysvar\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS]: \"The instruction does not have any accounts.\",\n [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA]: \"The instruction does not have any data.\",\n [SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH]: \"Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.\",\n [SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH]: \"Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__INVALID_NONCE]: \"The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING]: \"Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED]: \"Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE]: \"Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING]: \"Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE]: \"Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant\",\n [SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR]: \"JSON-RPC error: Internal JSON-RPC error ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_PARAMS]: \"JSON-RPC error: Invalid method parameter(s) ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__INVALID_REQUEST]: \"JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND]: \"JSON-RPC error: The method does not exist / is not available ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__PARSE_ERROR]: \"JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)\",\n [SOLANA_ERROR__JSON_RPC__SCAN_ERROR]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED]: \"Minimum context slot has not been reached\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY]: \"Node is unhealthy; behind by $numSlotsBehind slots\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT]: \"No snapshot\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE]: \"Transaction simulation failed\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE]: \"Transaction history is not available from this node\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE]: \"$__serverMessage\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH]: \"Transaction signature length mismatch\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE]: \"Transaction signature verification failure\",\n [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION]: \"$__serverMessage\",\n [SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH]: \"Key pair bytes must be of length 64, got $byteLength.\",\n [SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH]: \"Expected private key bytes with length 32. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH]: \"Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.\",\n [SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY]: \"The provided private key does not match the provided public key.\",\n [SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE]: \"Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.\",\n [SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE]: \"Lamports value must be in the range [0, 2e64-1]\",\n [SOLANA_ERROR__MALFORMED_BIGINT_STRING]: \"`$value` cannot be parsed as a `BigInt`\",\n [SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR]: \"$message\",\n [SOLANA_ERROR__MALFORMED_NUMBER_STRING]: \"`$value` cannot be parsed as a `Number`\",\n [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: \"No nonce account could be found at address `$nonceAccountAddress`\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN]: \"The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED]: \"WebSocket was closed before payload could be added to the send buffer\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED]: \"WebSocket connection closed\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT]: \"WebSocket failed to connect\",\n [SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID]: \"Failed to obtain a subscription id from the server\",\n [SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD]: \"Could not find an API plan for RPC method: `$method`\",\n [SOLANA_ERROR__RPC__INTEGER_OVERFLOW]: \"The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR]: \"HTTP error ($statusCode): $message\",\n [SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN]: \"HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.\",\n [SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS]: \"Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.\",\n [SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER]: \"The provided value does not implement the `KeyPairSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER]: \"The provided value does not implement the `MessageModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER]: \"The provided value does not implement the `MessagePartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER]: \"The provided value does not implement any of the `MessageSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER]: \"The provided value does not implement the `TransactionModifyingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER]: \"The provided value does not implement the `TransactionPartialSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER]: \"The provided value does not implement the `TransactionSendingSigner` interface\",\n [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER]: \"The provided value does not implement any of the `TransactionSigner` interfaces\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS]: \"More than one `TransactionSendingSigner` was identified.\",\n [SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING]: \"No `TransactionSendingSigner` was identified. Please provide a valid `ITransactionWithSingleSendingSigner` transaction.\",\n [SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED]: \"Wallet account signers do not support signing multiple messages/transactions in a single operation\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY]: \"Cannot export a non-extractable key.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED]: \"No digest implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT]: \"Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED]: \"This runtime does not support the generation of Ed25519 key pairs.\\n\\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\\n\\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED]: \"No signature verification implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED]: \"No key generation implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED]: \"No signing implementation could be found.\",\n [SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED]: \"No key export implementation could be found.\",\n [SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE]: \"Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING]: \"Transaction processing left an account with an outstanding borrowed reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE]: \"Account in use\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE]: \"Account loaded twice\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND]: \"Attempt to debit an account but found no record of a prior credit.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND]: \"Transaction loads an address table account that doesn't exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED]: \"This transaction has already been processed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND]: \"Blockhash not found\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP]: \"Loader call chain is too deep\",\n [SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE]: \"Transactions are currently disabled due to cluster maintenance\",\n [SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION]: \"Transaction contains a duplicate instruction ($index) that is not allowed\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE]: \"Insufficient funds for fee\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT]: \"Transaction results in an account ($accountIndex) with insufficient funds for rent\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE]: \"This account may not be used to pay transaction fees\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX]: \"Transaction contains an invalid account reference\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA]: \"Transaction loads an address table account with invalid data\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX]: \"Transaction address table lookup uses an invalid index\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER]: \"Transaction loads an address table account with an invalid owner\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT]: \"LoadedAccountsDataSizeLimit set for transaction must be greater than 0.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION]: \"This program may not be used for executing instructions\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT]: \"Transaction leaves an account with a lower balance than rent-exempt minimum\",\n [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT]: \"Transaction loads a writable account that cannot be written\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED]: \"Transaction exceeded max loaded accounts data size cap\",\n [SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE]: \"Transaction requires a fee but has no signature present\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND]: \"Attempt to load a program that does not exist\",\n [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED]: \"Execution of the program referenced by account at index $accountIndex is temporarily restricted.\",\n [SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED]: \"ResanitizationNeeded\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE]: \"Transaction failed to sanitize accounts offsets correctly\",\n [SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE]: \"Transaction did not pass signature verification\",\n [SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS]: \"Transaction locked too many accounts\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION]: \"Sum of account balances before and after transaction do not match\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN]: \"The transaction failed with the error `$errorName`\",\n [SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION]: \"Transaction version is unsupported\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT]: \"Transaction would exceed account data limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT]: \"Transaction would exceed total account data limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT]: \"Transaction would exceed max account limit within the block\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT]: \"Transaction would exceed max Block Cost Limit\",\n [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT]: \"Transaction would exceed max Vote Cost Limit\",\n [SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION]: \"Attempted to sign a transaction with an address that is not a signer for it\",\n [SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING]: \"Transaction is missing an address at index: $index.\",\n [SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES]: \"Transaction has no expected signers therefore it cannot be encoded\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME]: \"Transaction does not have a blockhash lifetime\",\n [SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME]: \"Transaction is not a durable nonce transaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING]: \"Contents of these address lookup tables unknown: $lookupTableAddresses\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE]: \"Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING]: \"No fee payer set in CompiledTransaction\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND]: \"Could not find program address at index $index\",\n [SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT]: \"Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT]: \"Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING]: \"Transaction is missing a fee payer.\",\n [SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING]: \"Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE]: \"Transaction first instruction is not advance nonce account instruction.\",\n [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING]: \"Transaction with no instructions cannot be durable nonce transaction.\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES]: \"This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees\",\n [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE]: \"This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable\",\n [SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH]: \"The transaction message expected the transaction to have $signerAddressesLength signatures, got $signaturesLength.\",\n [SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING]: \"Transaction is missing signatures for addresses: $addresses.\",\n [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE]: \"Transaction version must be in the range [0, 127]. `$actualVersion` given\"\n};\n\n// src/message-formatter.ts\nvar START_INDEX = \"i\";\nvar TYPE = \"t\";\nfunction getHumanReadableErrorMessage(code, context = {}) {\n const messageFormatString = SolanaErrorMessages[code];\n if (messageFormatString.length === 0) {\n return \"\";\n }\n let state;\n function commitStateUpTo(endIndex) {\n if (state[TYPE] === 2 /* Variable */) {\n const variableName = messageFormatString.slice(state[START_INDEX] + 1, endIndex);\n fragments.push(\n variableName in context ? (\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n `${context[variableName]}`\n ) : `$${variableName}`\n );\n } else if (state[TYPE] === 1 /* Text */) {\n fragments.push(messageFormatString.slice(state[START_INDEX], endIndex));\n }\n }\n const fragments = [];\n messageFormatString.split(\"\").forEach((char, ii) => {\n if (ii === 0) {\n state = {\n [START_INDEX]: 0,\n [TYPE]: messageFormatString[0] === \"\\\\\" ? 0 /* EscapeSequence */ : messageFormatString[0] === \"$\" ? 2 /* Variable */ : 1 /* Text */\n };\n return;\n }\n let nextState;\n switch (state[TYPE]) {\n case 0 /* EscapeSequence */:\n nextState = { [START_INDEX]: ii, [TYPE]: 1 /* Text */ };\n break;\n case 1 /* Text */:\n if (char === \"\\\\\") {\n nextState = { [START_INDEX]: ii, [TYPE]: 0 /* EscapeSequence */ };\n } else if (char === \"$\") {\n nextState = { [START_INDEX]: ii, [TYPE]: 2 /* Variable */ };\n }\n break;\n case 2 /* Variable */:\n if (char === \"\\\\\") {\n nextState = { [START_INDEX]: ii, [TYPE]: 0 /* EscapeSequence */ };\n } else if (char === \"$\") {\n nextState = { [START_INDEX]: ii, [TYPE]: 2 /* Variable */ };\n } else if (!char.match(/\\w/)) {\n nextState = { [START_INDEX]: ii, [TYPE]: 1 /* Text */ };\n }\n break;\n }\n if (nextState) {\n if (state !== nextState) {\n commitStateUpTo(ii);\n }\n state = nextState;\n }\n });\n commitStateUpTo();\n return fragments.join(\"\");\n}\nfunction getErrorMessage(code, context = {}) {\n if (process.env.NODE_ENV !== \"production\") {\n return getHumanReadableErrorMessage(code, context);\n } else {\n let decodingAdviceMessage = `Solana error #${code}; Decode this error by running \\`npx @solana/errors decode -- ${code}`;\n if (Object.keys(context).length) {\n decodingAdviceMessage += ` '${encodeContextObject(context)}'`;\n }\n return `${decodingAdviceMessage}\\``;\n }\n}\n\n// src/error.ts\nfunction isSolanaError(e, code) {\n const isSolanaError2 = e instanceof Error && e.name === \"SolanaError\";\n if (isSolanaError2) {\n if (code !== undefined) {\n return e.context.__code === code;\n }\n return true;\n }\n return false;\n}\nvar SolanaError = class extends Error {\n /**\n * Indicates the root cause of this {@link SolanaError}, if any.\n *\n * For example, a transaction error might have an instruction error as its root cause. In this\n * case, you will be able to access the instruction error on the transaction error as `cause`.\n */\n cause = this.cause;\n /**\n * Contains context that can assist in understanding or recovering from a {@link SolanaError}.\n */\n context;\n constructor(...[code, contextAndErrorOptions]) {\n let context;\n let errorOptions;\n if (contextAndErrorOptions) {\n const { cause, ...contextRest } = contextAndErrorOptions;\n if (cause) {\n errorOptions = { cause };\n }\n if (Object.keys(contextRest).length > 0) {\n context = contextRest;\n }\n }\n const message = getErrorMessage(code, context);\n super(message, errorOptions);\n this.context = {\n __code: code,\n ...context\n };\n this.name = \"SolanaError\";\n }\n};\n\n// src/stack-trace.ts\nfunction safeCaptureStackTrace(...args) {\n if (\"captureStackTrace\" in Error && typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(...args);\n }\n}\n\n// src/rpc-enum-errors.ts\nfunction getSolanaErrorFromRpcError({ errorCodeBaseOffset, getErrorContext, orderedErrorNames, rpcEnumError }, constructorOpt) {\n let rpcErrorName;\n let rpcErrorContext;\n if (typeof rpcEnumError === \"string\") {\n rpcErrorName = rpcEnumError;\n } else {\n rpcErrorName = Object.keys(rpcEnumError)[0];\n rpcErrorContext = rpcEnumError[rpcErrorName];\n }\n const codeOffset = orderedErrorNames.indexOf(rpcErrorName);\n const errorCode = errorCodeBaseOffset + codeOffset;\n const errorContext = getErrorContext(errorCode, rpcErrorName, rpcErrorContext);\n const err = new SolanaError(errorCode, errorContext);\n safeCaptureStackTrace(err, constructorOpt);\n return err;\n}\n\n// src/instruction-error.ts\nvar ORDERED_ERROR_NAMES = [\n // Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/program/src/instruction.rs\n // If this list ever gets too large, consider implementing a compression strategy like this:\n // https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47\n \"GenericError\",\n \"InvalidArgument\",\n \"InvalidInstructionData\",\n \"InvalidAccountData\",\n \"AccountDataTooSmall\",\n \"InsufficientFunds\",\n \"IncorrectProgramId\",\n \"MissingRequiredSignature\",\n \"AccountAlreadyInitialized\",\n \"UninitializedAccount\",\n \"UnbalancedInstruction\",\n \"ModifiedProgramId\",\n \"ExternalAccountLamportSpend\",\n \"ExternalAccountDataModified\",\n \"ReadonlyLamportChange\",\n \"ReadonlyDataModified\",\n \"DuplicateAccountIndex\",\n \"ExecutableModified\",\n \"RentEpochModified\",\n \"NotEnoughAccountKeys\",\n \"AccountDataSizeChanged\",\n \"AccountNotExecutable\",\n \"AccountBorrowFailed\",\n \"AccountBorrowOutstanding\",\n \"DuplicateAccountOutOfSync\",\n \"Custom\",\n \"InvalidError\",\n \"ExecutableDataModified\",\n \"ExecutableLamportChange\",\n \"ExecutableAccountNotRentExempt\",\n \"UnsupportedProgramId\",\n \"CallDepth\",\n \"MissingAccount\",\n \"ReentrancyNotAllowed\",\n \"MaxSeedLengthExceeded\",\n \"InvalidSeeds\",\n \"InvalidRealloc\",\n \"ComputationalBudgetExceeded\",\n \"PrivilegeEscalation\",\n \"ProgramEnvironmentSetupFailure\",\n \"ProgramFailedToComplete\",\n \"ProgramFailedToCompile\",\n \"Immutable\",\n \"IncorrectAuthority\",\n \"BorshIoError\",\n \"AccountNotRentExempt\",\n \"InvalidAccountOwner\",\n \"ArithmeticOverflow\",\n \"UnsupportedSysvar\",\n \"IllegalOwner\",\n \"MaxAccountsDataAllocationsExceeded\",\n \"MaxAccountsExceeded\",\n \"MaxInstructionTraceLengthExceeded\",\n \"BuiltinProgramsMustConsumeComputeUnits\"\n];\nfunction getSolanaErrorFromInstructionError(index, instructionError) {\n const numberIndex = Number(index);\n return getSolanaErrorFromRpcError(\n {\n errorCodeBaseOffset: 4615001,\n getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {\n if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN) {\n return {\n errorName: rpcErrorName,\n index: numberIndex,\n ...rpcErrorContext !== undefined ? { instructionErrorContext: rpcErrorContext } : null\n };\n } else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM) {\n return {\n code: Number(rpcErrorContext),\n index: numberIndex\n };\n } else if (errorCode === SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR) {\n return {\n encodedData: rpcErrorContext,\n index: numberIndex\n };\n }\n return { index: numberIndex };\n },\n orderedErrorNames: ORDERED_ERROR_NAMES,\n rpcEnumError: instructionError\n },\n getSolanaErrorFromInstructionError\n );\n}\n\n// src/transaction-error.ts\nvar ORDERED_ERROR_NAMES2 = [\n // Keep synced with RPC source: https://github.com/anza-xyz/agave/blob/master/sdk/src/transaction/error.rs\n // If this list ever gets too large, consider implementing a compression strategy like this:\n // https://gist.github.com/steveluscher/aaa7cbbb5433b1197983908a40860c47\n \"AccountInUse\",\n \"AccountLoadedTwice\",\n \"AccountNotFound\",\n \"ProgramAccountNotFound\",\n \"InsufficientFundsForFee\",\n \"InvalidAccountForFee\",\n \"AlreadyProcessed\",\n \"BlockhashNotFound\",\n // `InstructionError` intentionally omitted; delegated to `getSolanaErrorFromInstructionError`\n \"CallChainTooDeep\",\n \"MissingSignatureForFee\",\n \"InvalidAccountIndex\",\n \"SignatureFailure\",\n \"InvalidProgramForExecution\",\n \"SanitizeFailure\",\n \"ClusterMaintenance\",\n \"AccountBorrowOutstanding\",\n \"WouldExceedMaxBlockCostLimit\",\n \"UnsupportedVersion\",\n \"InvalidWritableAccount\",\n \"WouldExceedMaxAccountCostLimit\",\n \"WouldExceedAccountDataBlockLimit\",\n \"TooManyAccountLocks\",\n \"AddressLookupTableNotFound\",\n \"InvalidAddressLookupTableOwner\",\n \"InvalidAddressLookupTableData\",\n \"InvalidAddressLookupTableIndex\",\n \"InvalidRentPayingAccount\",\n \"WouldExceedMaxVoteCostLimit\",\n \"WouldExceedAccountDataTotalLimit\",\n \"DuplicateInstruction\",\n \"InsufficientFundsForRent\",\n \"MaxLoadedAccountsDataSizeExceeded\",\n \"InvalidLoadedAccountsDataSizeLimit\",\n \"ResanitizationNeeded\",\n \"ProgramExecutionTemporarilyRestricted\",\n \"UnbalancedTransaction\"\n];\nfunction getSolanaErrorFromTransactionError(transactionError) {\n if (typeof transactionError === \"object\" && \"InstructionError\" in transactionError) {\n return getSolanaErrorFromInstructionError(\n ...transactionError.InstructionError\n );\n }\n return getSolanaErrorFromRpcError(\n {\n errorCodeBaseOffset: 7050001,\n getErrorContext(errorCode, rpcErrorName, rpcErrorContext) {\n if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN) {\n return {\n errorName: rpcErrorName,\n ...rpcErrorContext !== undefined ? { transactionErrorContext: rpcErrorContext } : null\n };\n } else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION) {\n return {\n index: Number(rpcErrorContext)\n };\n } else if (errorCode === SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT || errorCode === SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED) {\n return {\n accountIndex: Number(rpcErrorContext.account_index)\n };\n }\n },\n orderedErrorNames: ORDERED_ERROR_NAMES2,\n rpcEnumError: transactionError\n },\n getSolanaErrorFromTransactionError\n );\n}\n\n// src/json-rpc-error.ts\nfunction getSolanaErrorFromJsonRpcError(putativeErrorResponse) {\n let out;\n if (isRpcErrorResponse(putativeErrorResponse)) {\n const { code: rawCode, data, message } = putativeErrorResponse;\n const code = Number(rawCode);\n if (code === SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE) {\n const { err, ...preflightErrorContext } = data;\n const causeObject = err ? { cause: getSolanaErrorFromTransactionError(err) } : null;\n out = new SolanaError(SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE, {\n ...preflightErrorContext,\n ...causeObject\n });\n } else {\n let errorContext;\n switch (code) {\n case SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR:\n case SOLANA_ERROR__JSON_RPC__INVALID_PARAMS:\n case SOLANA_ERROR__JSON_RPC__INVALID_REQUEST:\n case SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND:\n case SOLANA_ERROR__JSON_RPC__PARSE_ERROR:\n case SOLANA_ERROR__JSON_RPC__SCAN_ERROR:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE:\n case SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION:\n errorContext = { __serverMessage: message };\n break;\n default:\n if (typeof data === \"object\" && !Array.isArray(data)) {\n errorContext = data;\n }\n }\n out = new SolanaError(code, errorContext);\n }\n } else {\n const message = typeof putativeErrorResponse === \"object\" && putativeErrorResponse !== null && \"message\" in putativeErrorResponse && typeof putativeErrorResponse.message === \"string\" ? putativeErrorResponse.message : \"Malformed JSON-RPC error with no message attribute\";\n out = new SolanaError(SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR, { error: putativeErrorResponse, message });\n }\n safeCaptureStackTrace(out, getSolanaErrorFromJsonRpcError);\n return out;\n}\nfunction isRpcErrorResponse(value) {\n return typeof value === \"object\" && value !== null && \"code\" in value && \"message\" in value && (typeof value.code === \"number\" || typeof value.code === \"bigint\") && typeof value.message === \"string\";\n}\n\nexport { SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND, SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED, SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT, SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT, SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND, SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED, SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS, SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH, SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY, SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE, SOLANA_ERROR__ADDRESSES__MALFORMED_PDA, SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED, SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED, SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE, SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER, SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE, SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE, SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY, SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS, SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL, SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH, SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH, SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH, SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE, SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH, SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH, SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH, SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE, SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH, SOLANA_ERROR__CODECS__INVALID_CONSTANT, SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT, SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT, SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT, SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS, SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE, SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE, SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE, SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE, SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES, SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE, SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED, SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED, SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED, SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING, SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED, SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL, SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE, SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT, SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW, SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS, SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH, SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX, SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC, SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT, SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE, SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND, SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER, SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE, SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY, SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS, SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA, SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER, SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT, SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR, SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA, SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC, SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS, SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED, SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT, SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE, SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS, SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION, SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE, SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE, SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE, SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE, SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED, SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED, SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION, SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT, SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN, SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID, SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR, SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS, SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA, SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH, SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH, SOLANA_ERROR__INVALID_NONCE, SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING, SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED, SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE, SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING, SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE, SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR, SOLANA_ERROR__JSON_RPC__INVALID_PARAMS, SOLANA_ERROR__JSON_RPC__INVALID_REQUEST, SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND, SOLANA_ERROR__JSON_RPC__PARSE_ERROR, SOLANA_ERROR__JSON_RPC__SCAN_ERROR, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE, SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION, SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH, SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH, SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH, SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY, SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE, SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE, SOLANA_ERROR__MALFORMED_BIGINT_STRING, SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR, SOLANA_ERROR__MALFORMED_NUMBER_STRING, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN, SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED, SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED, SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT, SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID, SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD, SOLANA_ERROR__RPC__INTEGER_OVERFLOW, SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR, SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN, SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS, SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER, SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER, SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER, SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER, SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER, SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER, SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER, SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER, SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS, SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING, SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED, SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY, SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED, SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT, SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED, SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED, SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED, SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED, SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED, SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE, SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING, SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE, SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE, SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED, SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP, SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE, SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION, SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE, SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT, SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE, SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX, SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA, SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX, SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER, SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION, SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT, SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT, SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED, SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE, SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND, SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED, SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED, SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE, SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE, SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS, SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION, SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN, SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION, SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT, SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT, SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION, SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING, SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES, SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME, SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME, SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING, SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE, SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING, SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND, SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT, SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT, SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING, SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING, SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE, SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES, SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE, SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH, SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING, SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE, SolanaError, getSolanaErrorFromInstructionError, getSolanaErrorFromJsonRpcError, getSolanaErrorFromTransactionError, isSolanaError, safeCaptureStackTrace };\n//# sourceMappingURL=index.browser.mjs.map\n//# sourceMappingURL=index.browser.mjs.map","import { SolanaError, SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH, SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH, SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH, SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH, SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH, SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY, SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH, SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE, SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH, SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES, SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL } from '@solana/errors';\n\n// src/add-codec-sentinel.ts\n\n// src/bytes.ts\nvar mergeBytes = (byteArrays) => {\n const nonEmptyByteArrays = byteArrays.filter((arr) => arr.length);\n if (nonEmptyByteArrays.length === 0) {\n return byteArrays.length ? byteArrays[0] : new Uint8Array();\n }\n if (nonEmptyByteArrays.length === 1) {\n return nonEmptyByteArrays[0];\n }\n const totalLength = nonEmptyByteArrays.reduce((total, arr) => total + arr.length, 0);\n const result = new Uint8Array(totalLength);\n let offset = 0;\n nonEmptyByteArrays.forEach((arr) => {\n result.set(arr, offset);\n offset += arr.length;\n });\n return result;\n};\nvar padBytes = (bytes, length) => {\n if (bytes.length >= length) return bytes;\n const paddedBytes = new Uint8Array(length).fill(0);\n paddedBytes.set(bytes);\n return paddedBytes;\n};\nvar fixBytes = (bytes, length) => padBytes(bytes.length <= length ? bytes : bytes.slice(0, length), length);\nfunction containsBytes(data, bytes, offset) {\n const slice = offset === 0 && data.length === bytes.length ? data : data.slice(offset, offset + bytes.length);\n if (slice.length !== bytes.length) return false;\n return bytes.every((b, i) => b === slice[i]);\n}\nfunction getEncodedSize(value, encoder) {\n return \"fixedSize\" in encoder ? encoder.fixedSize : encoder.getSizeFromValue(value);\n}\nfunction createEncoder(encoder) {\n return Object.freeze({\n ...encoder,\n encode: (value) => {\n const bytes = new Uint8Array(getEncodedSize(value, encoder));\n encoder.write(value, bytes, 0);\n return bytes;\n }\n });\n}\nfunction createDecoder(decoder) {\n return Object.freeze({\n ...decoder,\n decode: (bytes, offset = 0) => decoder.read(bytes, offset)[0]\n });\n}\nfunction createCodec(codec) {\n return Object.freeze({\n ...codec,\n decode: (bytes, offset = 0) => codec.read(bytes, offset)[0],\n encode: (value) => {\n const bytes = new Uint8Array(getEncodedSize(value, codec));\n codec.write(value, bytes, 0);\n return bytes;\n }\n });\n}\nfunction isFixedSize(codec) {\n return \"fixedSize\" in codec && typeof codec.fixedSize === \"number\";\n}\nfunction assertIsFixedSize(codec) {\n if (!isFixedSize(codec)) {\n throw new SolanaError(SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH);\n }\n}\nfunction isVariableSize(codec) {\n return !isFixedSize(codec);\n}\nfunction assertIsVariableSize(codec) {\n if (!isVariableSize(codec)) {\n throw new SolanaError(SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH);\n }\n}\nfunction combineCodec(encoder, decoder) {\n if (isFixedSize(encoder) !== isFixedSize(decoder)) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH);\n }\n if (isFixedSize(encoder) && isFixedSize(decoder) && encoder.fixedSize !== decoder.fixedSize) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH, {\n decoderFixedSize: decoder.fixedSize,\n encoderFixedSize: encoder.fixedSize\n });\n }\n if (!isFixedSize(encoder) && !isFixedSize(decoder) && encoder.maxSize !== decoder.maxSize) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH, {\n decoderMaxSize: decoder.maxSize,\n encoderMaxSize: encoder.maxSize\n });\n }\n return {\n ...decoder,\n ...encoder,\n decode: decoder.decode,\n encode: encoder.encode,\n read: decoder.read,\n write: encoder.write\n };\n}\n\n// src/add-codec-sentinel.ts\nfunction addEncoderSentinel(encoder, sentinel) {\n const write = (value, bytes, offset) => {\n const encoderBytes = encoder.encode(value);\n if (findSentinelIndex(encoderBytes, sentinel) >= 0) {\n throw new SolanaError(SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL, {\n encodedBytes: encoderBytes,\n hexEncodedBytes: hexBytes(encoderBytes),\n hexSentinel: hexBytes(sentinel),\n sentinel\n });\n }\n bytes.set(encoderBytes, offset);\n offset += encoderBytes.length;\n bytes.set(sentinel, offset);\n offset += sentinel.length;\n return offset;\n };\n if (isFixedSize(encoder)) {\n return createEncoder({ ...encoder, fixedSize: encoder.fixedSize + sentinel.length, write });\n }\n return createEncoder({\n ...encoder,\n ...encoder.maxSize != null ? { maxSize: encoder.maxSize + sentinel.length } : {},\n getSizeFromValue: (value) => encoder.getSizeFromValue(value) + sentinel.length,\n write\n });\n}\nfunction addDecoderSentinel(decoder, sentinel) {\n const read = (bytes, offset) => {\n const candidateBytes = offset === 0 ? bytes : bytes.slice(offset);\n const sentinelIndex = findSentinelIndex(candidateBytes, sentinel);\n if (sentinelIndex === -1) {\n throw new SolanaError(SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES, {\n decodedBytes: candidateBytes,\n hexDecodedBytes: hexBytes(candidateBytes),\n hexSentinel: hexBytes(sentinel),\n sentinel\n });\n }\n const preSentinelBytes = candidateBytes.slice(0, sentinelIndex);\n return [decoder.decode(preSentinelBytes), offset + preSentinelBytes.length + sentinel.length];\n };\n if (isFixedSize(decoder)) {\n return createDecoder({ ...decoder, fixedSize: decoder.fixedSize + sentinel.length, read });\n }\n return createDecoder({\n ...decoder,\n ...decoder.maxSize != null ? { maxSize: decoder.maxSize + sentinel.length } : {},\n read\n });\n}\nfunction addCodecSentinel(codec, sentinel) {\n return combineCodec(addEncoderSentinel(codec, sentinel), addDecoderSentinel(codec, sentinel));\n}\nfunction findSentinelIndex(bytes, sentinel) {\n return bytes.findIndex((byte, index, arr) => {\n if (sentinel.length === 1) return byte === sentinel[0];\n return containsBytes(arr, sentinel, index);\n });\n}\nfunction hexBytes(bytes) {\n return bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, \"0\"), \"\");\n}\nfunction assertByteArrayIsNotEmptyForCodec(codecDescription, bytes, offset = 0) {\n if (bytes.length - offset <= 0) {\n throw new SolanaError(SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY, {\n codecDescription\n });\n }\n}\nfunction assertByteArrayHasEnoughBytesForCodec(codecDescription, expected, bytes, offset = 0) {\n const bytesLength = bytes.length - offset;\n if (bytesLength < expected) {\n throw new SolanaError(SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH, {\n bytesLength,\n codecDescription,\n expected\n });\n }\n}\nfunction assertByteArrayOffsetIsNotOutOfRange(codecDescription, offset, bytesLength) {\n if (offset < 0 || offset > bytesLength) {\n throw new SolanaError(SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE, {\n bytesLength,\n codecDescription,\n offset\n });\n }\n}\n\n// src/add-codec-size-prefix.ts\nfunction addEncoderSizePrefix(encoder, prefix) {\n const write = (value, bytes, offset) => {\n const encoderBytes = encoder.encode(value);\n offset = prefix.write(encoderBytes.length, bytes, offset);\n bytes.set(encoderBytes, offset);\n return offset + encoderBytes.length;\n };\n if (isFixedSize(prefix) && isFixedSize(encoder)) {\n return createEncoder({ ...encoder, fixedSize: prefix.fixedSize + encoder.fixedSize, write });\n }\n const prefixMaxSize = isFixedSize(prefix) ? prefix.fixedSize : prefix.maxSize ?? null;\n const encoderMaxSize = isFixedSize(encoder) ? encoder.fixedSize : encoder.maxSize ?? null;\n const maxSize = prefixMaxSize !== null && encoderMaxSize !== null ? prefixMaxSize + encoderMaxSize : null;\n return createEncoder({\n ...encoder,\n ...maxSize !== null ? { maxSize } : {},\n getSizeFromValue: (value) => {\n const encoderSize = getEncodedSize(value, encoder);\n return getEncodedSize(encoderSize, prefix) + encoderSize;\n },\n write\n });\n}\nfunction addDecoderSizePrefix(decoder, prefix) {\n const read = (bytes, offset) => {\n const [bigintSize, decoderOffset] = prefix.read(bytes, offset);\n const size = Number(bigintSize);\n offset = decoderOffset;\n if (offset > 0 || bytes.length > size) {\n bytes = bytes.slice(offset, offset + size);\n }\n assertByteArrayHasEnoughBytesForCodec(\"addDecoderSizePrefix\", size, bytes);\n return [decoder.decode(bytes), offset + size];\n };\n if (isFixedSize(prefix) && isFixedSize(decoder)) {\n return createDecoder({ ...decoder, fixedSize: prefix.fixedSize + decoder.fixedSize, read });\n }\n const prefixMaxSize = isFixedSize(prefix) ? prefix.fixedSize : prefix.maxSize ?? null;\n const decoderMaxSize = isFixedSize(decoder) ? decoder.fixedSize : decoder.maxSize ?? null;\n const maxSize = prefixMaxSize !== null && decoderMaxSize !== null ? prefixMaxSize + decoderMaxSize : null;\n return createDecoder({ ...decoder, ...maxSize !== null ? { maxSize } : {}, read });\n}\nfunction addCodecSizePrefix(codec, prefix) {\n return combineCodec(addEncoderSizePrefix(codec, prefix), addDecoderSizePrefix(codec, prefix));\n}\n\n// src/fix-codec-size.ts\nfunction fixEncoderSize(encoder, fixedBytes) {\n return createEncoder({\n fixedSize: fixedBytes,\n write: (value, bytes, offset) => {\n const variableByteArray = encoder.encode(value);\n const fixedByteArray = variableByteArray.length > fixedBytes ? variableByteArray.slice(0, fixedBytes) : variableByteArray;\n bytes.set(fixedByteArray, offset);\n return offset + fixedBytes;\n }\n });\n}\nfunction fixDecoderSize(decoder, fixedBytes) {\n return createDecoder({\n fixedSize: fixedBytes,\n read: (bytes, offset) => {\n assertByteArrayHasEnoughBytesForCodec(\"fixCodecSize\", fixedBytes, bytes, offset);\n if (offset > 0 || bytes.length > fixedBytes) {\n bytes = bytes.slice(offset, offset + fixedBytes);\n }\n if (isFixedSize(decoder)) {\n bytes = fixBytes(bytes, decoder.fixedSize);\n }\n const [value] = decoder.read(bytes, 0);\n return [value, offset + fixedBytes];\n }\n });\n}\nfunction fixCodecSize(codec, fixedBytes) {\n return combineCodec(fixEncoderSize(codec, fixedBytes), fixDecoderSize(codec, fixedBytes));\n}\n\n// src/offset-codec.ts\nfunction offsetEncoder(encoder, config) {\n return createEncoder({\n ...encoder,\n write: (value, bytes, preOffset) => {\n const wrapBytes = (offset) => modulo(offset, bytes.length);\n const newPreOffset = config.preOffset ? config.preOffset({ bytes, preOffset, wrapBytes }) : preOffset;\n assertByteArrayOffsetIsNotOutOfRange(\"offsetEncoder\", newPreOffset, bytes.length);\n const postOffset = encoder.write(value, bytes, newPreOffset);\n const newPostOffset = config.postOffset ? config.postOffset({ bytes, newPreOffset, postOffset, preOffset, wrapBytes }) : postOffset;\n assertByteArrayOffsetIsNotOutOfRange(\"offsetEncoder\", newPostOffset, bytes.length);\n return newPostOffset;\n }\n });\n}\nfunction offsetDecoder(decoder, config) {\n return createDecoder({\n ...decoder,\n read: (bytes, preOffset) => {\n const wrapBytes = (offset) => modulo(offset, bytes.length);\n const newPreOffset = config.preOffset ? config.preOffset({ bytes, preOffset, wrapBytes }) : preOffset;\n assertByteArrayOffsetIsNotOutOfRange(\"offsetDecoder\", newPreOffset, bytes.length);\n const [value, postOffset] = decoder.read(bytes, newPreOffset);\n const newPostOffset = config.postOffset ? config.postOffset({ bytes, newPreOffset, postOffset, preOffset, wrapBytes }) : postOffset;\n assertByteArrayOffsetIsNotOutOfRange(\"offsetDecoder\", newPostOffset, bytes.length);\n return [value, newPostOffset];\n }\n });\n}\nfunction offsetCodec(codec, config) {\n return combineCodec(offsetEncoder(codec, config), offsetDecoder(codec, config));\n}\nfunction modulo(dividend, divisor) {\n if (divisor === 0) return 0;\n return (dividend % divisor + divisor) % divisor;\n}\nfunction resizeEncoder(encoder, resize) {\n if (isFixedSize(encoder)) {\n const fixedSize = resize(encoder.fixedSize);\n if (fixedSize < 0) {\n throw new SolanaError(SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH, {\n bytesLength: fixedSize,\n codecDescription: \"resizeEncoder\"\n });\n }\n return createEncoder({ ...encoder, fixedSize });\n }\n return createEncoder({\n ...encoder,\n getSizeFromValue: (value) => {\n const newSize = resize(encoder.getSizeFromValue(value));\n if (newSize < 0) {\n throw new SolanaError(SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH, {\n bytesLength: newSize,\n codecDescription: \"resizeEncoder\"\n });\n }\n return newSize;\n }\n });\n}\nfunction resizeDecoder(decoder, resize) {\n if (isFixedSize(decoder)) {\n const fixedSize = resize(decoder.fixedSize);\n if (fixedSize < 0) {\n throw new SolanaError(SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH, {\n bytesLength: fixedSize,\n codecDescription: \"resizeDecoder\"\n });\n }\n return createDecoder({ ...decoder, fixedSize });\n }\n return decoder;\n}\nfunction resizeCodec(codec, resize) {\n return combineCodec(resizeEncoder(codec, resize), resizeDecoder(codec, resize));\n}\n\n// src/pad-codec.ts\nfunction padLeftEncoder(encoder, offset) {\n return offsetEncoder(\n resizeEncoder(encoder, (size) => size + offset),\n { preOffset: ({ preOffset }) => preOffset + offset }\n );\n}\nfunction padRightEncoder(encoder, offset) {\n return offsetEncoder(\n resizeEncoder(encoder, (size) => size + offset),\n { postOffset: ({ postOffset }) => postOffset + offset }\n );\n}\nfunction padLeftDecoder(decoder, offset) {\n return offsetDecoder(\n resizeDecoder(decoder, (size) => size + offset),\n { preOffset: ({ preOffset }) => preOffset + offset }\n );\n}\nfunction padRightDecoder(decoder, offset) {\n return offsetDecoder(\n resizeDecoder(decoder, (size) => size + offset),\n { postOffset: ({ postOffset }) => postOffset + offset }\n );\n}\nfunction padLeftCodec(codec, offset) {\n return combineCodec(padLeftEncoder(codec, offset), padLeftDecoder(codec, offset));\n}\nfunction padRightCodec(codec, offset) {\n return combineCodec(padRightEncoder(codec, offset), padRightDecoder(codec, offset));\n}\n\n// src/reverse-codec.ts\nfunction copySourceToTargetInReverse(source, target_WILL_MUTATE, sourceOffset, sourceLength, targetOffset = 0) {\n while (sourceOffset < --sourceLength) {\n const leftValue = source[sourceOffset];\n target_WILL_MUTATE[sourceOffset + targetOffset] = source[sourceLength];\n target_WILL_MUTATE[sourceLength + targetOffset] = leftValue;\n sourceOffset++;\n }\n if (sourceOffset === sourceLength) {\n target_WILL_MUTATE[sourceOffset + targetOffset] = source[sourceOffset];\n }\n}\nfunction reverseEncoder(encoder) {\n assertIsFixedSize(encoder);\n return createEncoder({\n ...encoder,\n write: (value, bytes, offset) => {\n const newOffset = encoder.write(value, bytes, offset);\n copySourceToTargetInReverse(\n bytes,\n bytes,\n offset,\n offset + encoder.fixedSize\n );\n return newOffset;\n }\n });\n}\nfunction reverseDecoder(decoder) {\n assertIsFixedSize(decoder);\n return createDecoder({\n ...decoder,\n read: (bytes, offset) => {\n const reversedBytes = bytes.slice();\n copySourceToTargetInReverse(\n bytes,\n reversedBytes,\n offset,\n offset + decoder.fixedSize\n );\n return decoder.read(reversedBytes, offset);\n }\n });\n}\nfunction reverseCodec(codec) {\n return combineCodec(reverseEncoder(codec), reverseDecoder(codec));\n}\n\n// src/transform-codec.ts\nfunction transformEncoder(encoder, unmap) {\n return createEncoder({\n ...isVariableSize(encoder) ? { ...encoder, getSizeFromValue: (value) => encoder.getSizeFromValue(unmap(value)) } : encoder,\n write: (value, bytes, offset) => encoder.write(unmap(value), bytes, offset)\n });\n}\nfunction transformDecoder(decoder, map) {\n return createDecoder({\n ...decoder,\n read: (bytes, offset) => {\n const [value, newOffset] = decoder.read(bytes, offset);\n return [map(value, bytes, offset), newOffset];\n }\n });\n}\nfunction transformCodec(codec, unmap, map) {\n return createCodec({\n ...transformEncoder(codec, unmap),\n read: map ? transformDecoder(codec, map).read : codec.read\n });\n}\n\nexport { addCodecSentinel, addCodecSizePrefix, addDecoderSentinel, addDecoderSizePrefix, addEncoderSentinel, addEncoderSizePrefix, assertByteArrayHasEnoughBytesForCodec, assertByteArrayIsNotEmptyForCodec, assertByteArrayOffsetIsNotOutOfRange, assertIsFixedSize, assertIsVariableSize, combineCodec, containsBytes, createCodec, createDecoder, createEncoder, fixBytes, fixCodecSize, fixDecoderSize, fixEncoderSize, getEncodedSize, isFixedSize, isVariableSize, mergeBytes, offsetCodec, offsetDecoder, offsetEncoder, padBytes, padLeftCodec, padLeftDecoder, padLeftEncoder, padRightCodec, padRightDecoder, padRightEncoder, resizeCodec, resizeDecoder, resizeEncoder, reverseCodec, reverseDecoder, reverseEncoder, transformCodec, transformDecoder, transformEncoder };\n//# sourceMappingURL=index.browser.mjs.map\n//# sourceMappingURL=index.browser.mjs.map","import { SolanaError, SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE } from '@solana/errors';\nimport { combineCodec, createDecoder, createEncoder, assertByteArrayIsNotEmptyForCodec, assertByteArrayHasEnoughBytesForCodec } from '@solana/codecs-core';\n\n// src/assertions.ts\nfunction assertNumberIsBetweenForCodec(codecDescription, min, max, value) {\n if (value < min || value > max) {\n throw new SolanaError(SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE, {\n codecDescription,\n max,\n min,\n value\n });\n }\n}\n\n// src/common.ts\nvar Endian = /* @__PURE__ */ ((Endian2) => {\n Endian2[Endian2[\"Little\"] = 0] = \"Little\";\n Endian2[Endian2[\"Big\"] = 1] = \"Big\";\n return Endian2;\n})(Endian || {});\nfunction isLittleEndian(config) {\n return config?.endian === 1 /* Big */ ? false : true;\n}\nfunction numberEncoderFactory(input) {\n return createEncoder({\n fixedSize: input.size,\n write(value, bytes, offset) {\n if (input.range) {\n assertNumberIsBetweenForCodec(input.name, input.range[0], input.range[1], value);\n }\n const arrayBuffer = new ArrayBuffer(input.size);\n input.set(new DataView(arrayBuffer), value, isLittleEndian(input.config));\n bytes.set(new Uint8Array(arrayBuffer), offset);\n return offset + input.size;\n }\n });\n}\nfunction numberDecoderFactory(input) {\n return createDecoder({\n fixedSize: input.size,\n read(bytes, offset = 0) {\n assertByteArrayIsNotEmptyForCodec(input.name, bytes, offset);\n assertByteArrayHasEnoughBytesForCodec(input.name, input.size, bytes, offset);\n const view = new DataView(toArrayBuffer(bytes, offset, input.size));\n return [input.get(view, isLittleEndian(input.config)), offset + input.size];\n }\n });\n}\nfunction toArrayBuffer(bytes, offset, length) {\n const bytesOffset = bytes.byteOffset + (offset ?? 0);\n const bytesLength = length ?? bytes.byteLength;\n return bytes.buffer.slice(bytesOffset, bytesOffset + bytesLength);\n}\n\n// src/f32.ts\nvar getF32Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"f32\",\n set: (view, value, le) => view.setFloat32(0, Number(value), le),\n size: 4\n});\nvar getF32Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => view.getFloat32(0, le),\n name: \"f32\",\n size: 4\n});\nvar getF32Codec = (config = {}) => combineCodec(getF32Encoder(config), getF32Decoder(config));\nvar getF64Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"f64\",\n set: (view, value, le) => view.setFloat64(0, Number(value), le),\n size: 8\n});\nvar getF64Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => view.getFloat64(0, le),\n name: \"f64\",\n size: 8\n});\nvar getF64Codec = (config = {}) => combineCodec(getF64Encoder(config), getF64Decoder(config));\nvar getI128Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"i128\",\n range: [-BigInt(\"0x7fffffffffffffffffffffffffffffff\") - 1n, BigInt(\"0x7fffffffffffffffffffffffffffffff\")],\n set: (view, value, le) => {\n const leftOffset = le ? 8 : 0;\n const rightOffset = le ? 0 : 8;\n const rightMask = 0xffffffffffffffffn;\n view.setBigInt64(leftOffset, BigInt(value) >> 64n, le);\n view.setBigUint64(rightOffset, BigInt(value) & rightMask, le);\n },\n size: 16\n});\nvar getI128Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => {\n const leftOffset = le ? 8 : 0;\n const rightOffset = le ? 0 : 8;\n const left = view.getBigInt64(leftOffset, le);\n const right = view.getBigUint64(rightOffset, le);\n return (left << 64n) + right;\n },\n name: \"i128\",\n size: 16\n});\nvar getI128Codec = (config = {}) => combineCodec(getI128Encoder(config), getI128Decoder(config));\nvar getI16Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"i16\",\n range: [-Number(\"0x7fff\") - 1, Number(\"0x7fff\")],\n set: (view, value, le) => view.setInt16(0, Number(value), le),\n size: 2\n});\nvar getI16Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => view.getInt16(0, le),\n name: \"i16\",\n size: 2\n});\nvar getI16Codec = (config = {}) => combineCodec(getI16Encoder(config), getI16Decoder(config));\nvar getI32Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"i32\",\n range: [-Number(\"0x7fffffff\") - 1, Number(\"0x7fffffff\")],\n set: (view, value, le) => view.setInt32(0, Number(value), le),\n size: 4\n});\nvar getI32Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => view.getInt32(0, le),\n name: \"i32\",\n size: 4\n});\nvar getI32Codec = (config = {}) => combineCodec(getI32Encoder(config), getI32Decoder(config));\nvar getI64Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"i64\",\n range: [-BigInt(\"0x7fffffffffffffff\") - 1n, BigInt(\"0x7fffffffffffffff\")],\n set: (view, value, le) => view.setBigInt64(0, BigInt(value), le),\n size: 8\n});\nvar getI64Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => view.getBigInt64(0, le),\n name: \"i64\",\n size: 8\n});\nvar getI64Codec = (config = {}) => combineCodec(getI64Encoder(config), getI64Decoder(config));\nvar getI8Encoder = () => numberEncoderFactory({\n name: \"i8\",\n range: [-Number(\"0x7f\") - 1, Number(\"0x7f\")],\n set: (view, value) => view.setInt8(0, Number(value)),\n size: 1\n});\nvar getI8Decoder = () => numberDecoderFactory({\n get: (view) => view.getInt8(0),\n name: \"i8\",\n size: 1\n});\nvar getI8Codec = () => combineCodec(getI8Encoder(), getI8Decoder());\nvar getShortU16Encoder = () => createEncoder({\n getSizeFromValue: (value) => {\n if (value <= 127) return 1;\n if (value <= 16383) return 2;\n return 3;\n },\n maxSize: 3,\n write: (value, bytes, offset) => {\n assertNumberIsBetweenForCodec(\"shortU16\", 0, 65535, value);\n const shortU16Bytes = [0];\n for (let ii = 0; ; ii += 1) {\n const alignedValue = Number(value) >> ii * 7;\n if (alignedValue === 0) {\n break;\n }\n const nextSevenBits = 127 & alignedValue;\n shortU16Bytes[ii] = nextSevenBits;\n if (ii > 0) {\n shortU16Bytes[ii - 1] |= 128;\n }\n }\n bytes.set(shortU16Bytes, offset);\n return offset + shortU16Bytes.length;\n }\n});\nvar getShortU16Decoder = () => createDecoder({\n maxSize: 3,\n read: (bytes, offset) => {\n let value = 0;\n let byteCount = 0;\n while (++byteCount) {\n const byteIndex = byteCount - 1;\n const currentByte = bytes[offset + byteIndex];\n const nextSevenBits = 127 & currentByte;\n value |= nextSevenBits << byteIndex * 7;\n if ((currentByte & 128) === 0) {\n break;\n }\n }\n return [value, offset + byteCount];\n }\n});\nvar getShortU16Codec = () => combineCodec(getShortU16Encoder(), getShortU16Decoder());\nvar getU128Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"u128\",\n range: [0n, BigInt(\"0xffffffffffffffffffffffffffffffff\")],\n set: (view, value, le) => {\n const leftOffset = le ? 8 : 0;\n const rightOffset = le ? 0 : 8;\n const rightMask = 0xffffffffffffffffn;\n view.setBigUint64(leftOffset, BigInt(value) >> 64n, le);\n view.setBigUint64(rightOffset, BigInt(value) & rightMask, le);\n },\n size: 16\n});\nvar getU128Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => {\n const leftOffset = le ? 8 : 0;\n const rightOffset = le ? 0 : 8;\n const left = view.getBigUint64(leftOffset, le);\n const right = view.getBigUint64(rightOffset, le);\n return (left << 64n) + right;\n },\n name: \"u128\",\n size: 16\n});\nvar getU128Codec = (config = {}) => combineCodec(getU128Encoder(config), getU128Decoder(config));\nvar getU16Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"u16\",\n range: [0, Number(\"0xffff\")],\n set: (view, value, le) => view.setUint16(0, Number(value), le),\n size: 2\n});\nvar getU16Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => view.getUint16(0, le),\n name: \"u16\",\n size: 2\n});\nvar getU16Codec = (config = {}) => combineCodec(getU16Encoder(config), getU16Decoder(config));\nvar getU32Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"u32\",\n range: [0, Number(\"0xffffffff\")],\n set: (view, value, le) => view.setUint32(0, Number(value), le),\n size: 4\n});\nvar getU32Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => view.getUint32(0, le),\n name: \"u32\",\n size: 4\n});\nvar getU32Codec = (config = {}) => combineCodec(getU32Encoder(config), getU32Decoder(config));\nvar getU64Encoder = (config = {}) => numberEncoderFactory({\n config,\n name: \"u64\",\n range: [0n, BigInt(\"0xffffffffffffffff\")],\n set: (view, value, le) => view.setBigUint64(0, BigInt(value), le),\n size: 8\n});\nvar getU64Decoder = (config = {}) => numberDecoderFactory({\n config,\n get: (view, le) => view.getBigUint64(0, le),\n name: \"u64\",\n size: 8\n});\nvar getU64Codec = (config = {}) => combineCodec(getU64Encoder(config), getU64Decoder(config));\nvar getU8Encoder = () => numberEncoderFactory({\n name: \"u8\",\n range: [0, Number(\"0xff\")],\n set: (view, value) => view.setUint8(0, Number(value)),\n size: 1\n});\nvar getU8Decoder = () => numberDecoderFactory({\n get: (view) => view.getUint8(0),\n name: \"u8\",\n size: 1\n});\nvar getU8Codec = () => combineCodec(getU8Encoder(), getU8Decoder());\n\nexport { Endian, assertNumberIsBetweenForCodec, getF32Codec, getF32Decoder, getF32Encoder, getF64Codec, getF64Decoder, getF64Encoder, getI128Codec, getI128Decoder, getI128Encoder, getI16Codec, getI16Decoder, getI16Encoder, getI32Codec, getI32Decoder, getI32Encoder, getI64Codec, getI64Decoder, getI64Encoder, getI8Codec, getI8Decoder, getI8Encoder, getShortU16Codec, getShortU16Decoder, getShortU16Encoder, getU128Codec, getU128Decoder, getU128Encoder, getU16Codec, getU16Decoder, getU16Encoder, getU32Codec, getU32Decoder, getU32Encoder, getU64Codec, getU64Decoder, getU64Encoder, getU8Codec, getU8Decoder, getU8Encoder };\n//# sourceMappingURL=index.browser.mjs.map\n//# sourceMappingURL=index.browser.mjs.map","import {Buffer} from 'buffer';\nimport {blob, Layout} from '@solana/buffer-layout';\nimport {getU64Codec} from '@solana/codecs-numbers';\n\nexport function u64(property?: string): Layout {\n const layout = blob(8 /* bytes */, property);\n const decode = layout.decode.bind(layout);\n const encode = layout.encode.bind(layout);\n\n const bigIntLayout = layout as Layout as Layout;\n const codec = getU64Codec();\n\n bigIntLayout.decode = (buffer: Buffer, offset: number) => {\n const src = decode(buffer as Uint8Array, offset);\n return codec.decode(src);\n };\n\n bigIntLayout.encode = (bigInt: bigint, buffer: Buffer, offset: number) => {\n const src = codec.encode(bigInt) as Uint8Array;\n return encode(src, buffer as Uint8Array, offset);\n };\n\n return bigIntLayout;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {NONCE_ACCOUNT_LENGTH} from '../nonce-account';\nimport {PublicKey} from '../publickey';\nimport {SYSVAR_RECENT_BLOCKHASHES_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\nimport {u64} from '../utils/bigint';\n\n/**\n * Create account system transaction params\n */\nexport type CreateAccountParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account */\n newAccountPubkey: PublicKey;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Transfer system transaction params\n */\nexport type TransferParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n};\n\n/**\n * Assign system transaction params\n */\nexport type AssignParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Create account with seed system transaction params\n */\nexport type CreateAccountWithSeedParams = {\n /** The account that will transfer lamports to the created account */\n fromPubkey: PublicKey;\n /** Public key of the created account. Must be pre-calculated with PublicKey.createWithSeed() */\n newAccountPubkey: PublicKey;\n /** Base public key to use to derive the address of the created account. Must be the same as the base key used to create `newAccountPubkey` */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the created account. Must be the same as the seed used to create `newAccountPubkey` */\n seed: string;\n /** Amount of lamports to transfer to the created account */\n lamports: number;\n /** Amount of space in bytes to allocate to the created account */\n space: number;\n /** Public key of the program to assign as the owner of the created account */\n programId: PublicKey;\n};\n\n/**\n * Create nonce account system transaction params\n */\nexport type CreateNonceAccountParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n};\n\n/**\n * Create nonce account with seed system transaction params\n */\nexport type CreateNonceAccountWithSeedParams = {\n /** The account that will transfer lamports to the created nonce account */\n fromPubkey: PublicKey;\n /** Public key of the created nonce account */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the created nonce account */\n authorizedPubkey: PublicKey;\n /** Amount of lamports to transfer to the created nonce account */\n lamports: number;\n /** Base public key to use to derive the address of the nonce account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the nonce account */\n seed: string;\n};\n\n/**\n * Initialize nonce account system instruction params\n */\nexport type InitializeNonceParams = {\n /** Nonce account which will be initialized */\n noncePubkey: PublicKey;\n /** Public key to set as authority of the initialized nonce account */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Advance nonce account system instruction params\n */\nexport type AdvanceNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Withdraw nonce account system transaction params\n */\nexport type WithdrawNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key of the account which will receive the withdrawn nonce account balance */\n toPubkey: PublicKey;\n /** Amount of lamports to withdraw from the nonce account */\n lamports: number;\n};\n\n/**\n * Authorize nonce account system transaction params\n */\nexport type AuthorizeNonceParams = {\n /** Nonce account */\n noncePubkey: PublicKey;\n /** Public key of the current nonce authority */\n authorizedPubkey: PublicKey;\n /** Public key to set as the new nonce authority */\n newAuthorizedPubkey: PublicKey;\n};\n\n/**\n * Allocate account system transaction params\n */\nexport type AllocateParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Amount of space in bytes to allocate */\n space: number;\n};\n\n/**\n * Allocate account with seed system transaction params\n */\nexport type AllocateWithSeedParams = {\n /** Account to allocate */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the allocated account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the allocated account */\n seed: string;\n /** Amount of space in bytes to allocate */\n space: number;\n /** Public key of the program to assign as the owner of the allocated account */\n programId: PublicKey;\n};\n\n/**\n * Assign account with seed system transaction params\n */\nexport type AssignWithSeedParams = {\n /** Public key of the account which will be assigned a new owner */\n accountPubkey: PublicKey;\n /** Base public key to use to derive the address of the assigned account */\n basePubkey: PublicKey;\n /** Seed to use to derive the address of the assigned account */\n seed: string;\n /** Public key of the program to assign as the owner */\n programId: PublicKey;\n};\n\n/**\n * Transfer with seed system transaction params\n */\nexport type TransferWithSeedParams = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: number | bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/** Decoded transfer system transaction instruction */\nexport type DecodedTransferInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n};\n\n/** Decoded transferWithSeed system transaction instruction */\nexport type DecodedTransferWithSeedInstruction = {\n /** Account that will transfer lamports */\n fromPubkey: PublicKey;\n /** Base public key to use to derive the funding account address */\n basePubkey: PublicKey;\n /** Account that will receive transferred lamports */\n toPubkey: PublicKey;\n /** Amount of lamports to transfer */\n lamports: bigint;\n /** Seed to use to derive the funding account address */\n seed: string;\n /** Program id to use to derive the funding account address */\n programId: PublicKey;\n};\n\n/**\n * System Instruction class\n */\nexport class SystemInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a system instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): SystemInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: SystemInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(SYSTEM_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as SystemInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a SystemInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a create account system instruction and retrieve the instruction params.\n */\n static decodeCreateAccount(\n instruction: TransactionInstruction,\n ): CreateAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Create,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a transfer system instruction and retrieve the instruction params.\n */\n static decodeTransfer(\n instruction: TransactionInstruction,\n ): DecodedTransferInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Transfer,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a transfer with seed system instruction and retrieve the instruction params.\n */\n static decodeTransferWithSeed(\n instruction: TransactionInstruction,\n ): DecodedTransferWithSeedInstruction {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n basePubkey: instruction.keys[1].pubkey,\n toPubkey: instruction.keys[2].pubkey,\n lamports,\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an allocate system instruction and retrieve the instruction params.\n */\n static decodeAllocate(instruction: TransactionInstruction): AllocateParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {space} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Allocate,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n space,\n };\n }\n\n /**\n * Decode an allocate with seed system instruction and retrieve the instruction params.\n */\n static decodeAllocateWithSeed(\n instruction: TransactionInstruction,\n ): AllocateWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign system instruction and retrieve the instruction params.\n */\n static decodeAssign(instruction: TransactionInstruction): AssignParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.Assign,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode an assign with seed system instruction and retrieve the instruction params.\n */\n static decodeAssignWithSeed(\n instruction: TransactionInstruction,\n ): AssignWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 1);\n\n const {base, seed, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed,\n instruction.data,\n );\n\n return {\n accountPubkey: instruction.keys[0].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a create account with seed system instruction and retrieve the instruction params.\n */\n static decodeCreateWithSeed(\n instruction: TransactionInstruction,\n ): CreateAccountWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {base, seed, lamports, space, programId} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed,\n instruction.data,\n );\n\n return {\n fromPubkey: instruction.keys[0].pubkey,\n newAccountPubkey: instruction.keys[1].pubkey,\n basePubkey: new PublicKey(base),\n seed,\n lamports,\n space,\n programId: new PublicKey(programId),\n };\n }\n\n /**\n * Decode a nonce initialize system instruction and retrieve the instruction params.\n */\n static decodeNonceInitialize(\n instruction: TransactionInstruction,\n ): InitializeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * Decode a nonce advance system instruction and retrieve the instruction params.\n */\n static decodeNonceAdvance(\n instruction: TransactionInstruction,\n ): AdvanceNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * Decode a nonce withdraw system instruction and retrieve the instruction params.\n */\n static decodeNonceWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n\n const {lamports} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a nonce authorize system instruction and retrieve the instruction params.\n */\n static decodeNonceAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeNonceParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized} = decodeData(\n SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount,\n instruction.data,\n );\n\n return {\n noncePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[1].pubkey,\n newAuthorizedPubkey: new PublicKey(authorized),\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(SystemProgram.programId)) {\n throw new Error('invalid instruction; programId is not SystemProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid SystemInstructionType's\n */\nexport type SystemInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof SystemInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'AdvanceNonceAccount'\n | 'Allocate'\n | 'AllocateWithSeed'\n | 'Assign'\n | 'AssignWithSeed'\n | 'AuthorizeNonceAccount'\n | 'Create'\n | 'CreateWithSeed'\n | 'InitializeNonceAccount'\n | 'Transfer'\n | 'TransferWithSeed'\n | 'WithdrawNonceAccount'\n | 'UpgradeNonceAccount';\n\ntype SystemInstructionInputData = {\n AdvanceNonceAccount: IInstructionInputData;\n Allocate: IInstructionInputData & {\n space: number;\n };\n AllocateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n Assign: IInstructionInputData & {\n programId: Uint8Array;\n };\n AssignWithSeed: IInstructionInputData & {\n base: Uint8Array;\n seed: string;\n programId: Uint8Array;\n };\n AuthorizeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Create: IInstructionInputData & {\n lamports: number;\n programId: Uint8Array;\n space: number;\n };\n CreateWithSeed: IInstructionInputData & {\n base: Uint8Array;\n lamports: number;\n programId: Uint8Array;\n seed: string;\n space: number;\n };\n InitializeNonceAccount: IInstructionInputData & {\n authorized: Uint8Array;\n };\n Transfer: IInstructionInputData & {\n lamports: bigint;\n };\n TransferWithSeed: IInstructionInputData & {\n lamports: bigint;\n programId: Uint8Array;\n seed: string;\n };\n WithdrawNonceAccount: IInstructionInputData & {\n lamports: number;\n };\n UpgradeNonceAccount: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid system InstructionType's\n * @internal\n */\nexport const SYSTEM_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in SystemInstructionType]: InstructionType<\n SystemInstructionInputData[Instruction]\n >;\n}>({\n Create: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n Assign: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('programId'),\n ]),\n },\n Transfer: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n u64('lamports'),\n ]),\n },\n CreateWithSeed: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('lamports'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ]),\n },\n AdvanceNonceAccount: {\n index: 4,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AdvanceNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n WithdrawNonceAccount: {\n index: 5,\n layout: BufferLayout.struct<\n SystemInstructionInputData['WithdrawNonceAccount']\n >([BufferLayout.u32('instruction'), BufferLayout.ns64('lamports')]),\n },\n InitializeNonceAccount: {\n index: 6,\n layout: BufferLayout.struct<\n SystemInstructionInputData['InitializeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n AuthorizeNonceAccount: {\n index: 7,\n layout: BufferLayout.struct<\n SystemInstructionInputData['AuthorizeNonceAccount']\n >([BufferLayout.u32('instruction'), Layout.publicKey('authorized')]),\n },\n Allocate: {\n index: 8,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('space'),\n ]),\n },\n AllocateWithSeed: {\n index: 9,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n BufferLayout.ns64('space'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n AssignWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('base'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ]),\n },\n TransferWithSeed: {\n index: 11,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n u64('lamports'),\n Layout.rustString('seed'),\n Layout.publicKey('programId'),\n ],\n ),\n },\n UpgradeNonceAccount: {\n index: 12,\n layout: BufferLayout.struct<\n SystemInstructionInputData['UpgradeNonceAccount']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\n/**\n * Factory class for transactions to interact with the System program\n */\nexport class SystemProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the System program\n */\n static programId: PublicKey = new PublicKey(\n '11111111111111111111111111111111',\n );\n\n /**\n * Generate a transaction instruction that creates a new account\n */\n static createAccount(params: CreateAccountParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Create;\n const data = encodeData(type, {\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: true, isWritable: true},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that transfers lamports from one account to another\n */\n static transfer(\n params: TransferParams | TransferWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.TransferWithSeed;\n data = encodeData(type, {\n lamports: BigInt(params.lamports),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.fromPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Transfer;\n data = encodeData(type, {lamports: BigInt(params.lamports)});\n keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n ];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that assigns an account to a program\n */\n static assign(\n params: AssignParams | AssignWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AssignWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Assign;\n data = encodeData(type, {\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that creates a new account at\n * an address generated with `from`, a seed, and programId\n */\n static createAccountWithSeed(\n params: CreateAccountWithSeedParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.CreateWithSeed;\n const data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n lamports: params.lamports,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n let keys = [\n {pubkey: params.fromPubkey, isSigner: true, isWritable: true},\n {pubkey: params.newAccountPubkey, isSigner: false, isWritable: true},\n ];\n if (!params.basePubkey.equals(params.fromPubkey)) {\n keys.push({\n pubkey: params.basePubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that creates a new Nonce account\n */\n static createNonceAccount(\n params: CreateNonceAccountParams | CreateNonceAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n if ('basePubkey' in params && 'seed' in params) {\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n } else {\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.noncePubkey,\n lamports: params.lamports,\n space: NONCE_ACCOUNT_LENGTH,\n programId: this.programId,\n }),\n );\n }\n\n const initParams = {\n noncePubkey: params.noncePubkey,\n authorizedPubkey: params.authorizedPubkey,\n };\n\n transaction.add(this.nonceInitialize(initParams));\n return transaction;\n }\n\n /**\n * Generate an instruction to initialize a Nonce account\n */\n static nonceInitialize(\n params: InitializeNonceParams,\n ): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.InitializeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.authorizedPubkey.toBuffer()),\n });\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate an instruction to advance the nonce in a Nonce account\n */\n static nonceAdvance(params: AdvanceNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AdvanceNonceAccount;\n const data = encodeData(type);\n const instructionData = {\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction instruction that withdraws lamports from a Nonce account\n */\n static nonceWithdraw(params: WithdrawNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.WithdrawNonceAccount;\n const data = encodeData(type, {lamports: params.lamports});\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.toPubkey, isSigner: false, isWritable: true},\n {\n pubkey: SYSVAR_RECENT_BLOCKHASHES_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {\n pubkey: SYSVAR_RENT_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that authorizes a new PublicKey as the authority\n * on a Nonce account.\n */\n static nonceAuthorize(params: AuthorizeNonceParams): TransactionInstruction {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AuthorizeNonceAccount;\n const data = encodeData(type, {\n authorized: toBuffer(params.newAuthorizedPubkey.toBuffer()),\n });\n\n return new TransactionInstruction({\n keys: [\n {pubkey: params.noncePubkey, isSigner: false, isWritable: true},\n {pubkey: params.authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction instruction that allocates space in an account without funding\n */\n static allocate(\n params: AllocateParams | AllocateWithSeedParams,\n ): TransactionInstruction {\n let data;\n let keys;\n if ('basePubkey' in params) {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.AllocateWithSeed;\n data = encodeData(type, {\n base: toBuffer(params.basePubkey.toBuffer()),\n seed: params.seed,\n space: params.space,\n programId: toBuffer(params.programId.toBuffer()),\n });\n keys = [\n {pubkey: params.accountPubkey, isSigner: false, isWritable: true},\n {pubkey: params.basePubkey, isSigner: true, isWritable: false},\n ];\n } else {\n const type = SYSTEM_INSTRUCTION_LAYOUTS.Allocate;\n data = encodeData(type, {\n space: params.space,\n });\n keys = [{pubkey: params.accountPubkey, isSigner: true, isWritable: true}];\n }\n\n return new TransactionInstruction({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {PublicKey} from './publickey';\nimport {Transaction, PACKET_DATA_SIZE} from './transaction';\nimport {MS_PER_SLOT} from './timing';\nimport {SYSVAR_RENT_PUBKEY} from './sysvar';\nimport {sendAndConfirmTransaction} from './utils/send-and-confirm-transaction';\nimport {sleep} from './utils/sleep';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\nimport {SystemProgram} from './programs/system';\nimport {IInstructionInputData} from './instruction';\n\n// Keep program chunks under PACKET_DATA_SIZE, leaving enough room for the\n// rest of the Transaction fields\n//\n// TODO: replace 300 with a proper constant for the size of the other\n// Transaction fields\nconst CHUNK_SIZE = PACKET_DATA_SIZE - 300;\n\n/**\n * Program loader interface\n */\nexport class Loader {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Amount of program data placed in each load Transaction\n */\n static chunkSize: number = CHUNK_SIZE;\n\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return (\n 2 * // Every transaction requires two signatures (payer + program)\n (Math.ceil(dataLength / Loader.chunkSize) +\n 1 + // Add one for Create transaction\n 1) // Add one for Finalize transaction\n );\n }\n\n /**\n * Loads a generic program\n *\n * @param connection The connection to use\n * @param payer System account that pays to load the program\n * @param program Account to load the program into\n * @param programId Public key that identifies the loader\n * @param data Program octets\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static async load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n programId: PublicKey,\n data: Buffer | Uint8Array | Array,\n ): Promise {\n {\n const balanceNeeded = await connection.getMinimumBalanceForRentExemption(\n data.length,\n );\n\n // Fetch program account info to check if it has already been created\n const programInfo = await connection.getAccountInfo(\n program.publicKey,\n 'confirmed',\n );\n\n let transaction: Transaction | null = null;\n if (programInfo !== null) {\n if (programInfo.executable) {\n console.error('Program load failed, account is already executable');\n return false;\n }\n\n if (programInfo.data.length !== data.length) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: program.publicKey,\n space: data.length,\n }),\n );\n }\n\n if (!programInfo.owner.equals(programId)) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.assign({\n accountPubkey: program.publicKey,\n programId,\n }),\n );\n }\n\n if (programInfo.lamports < balanceNeeded) {\n transaction = transaction || new Transaction();\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: payer.publicKey,\n toPubkey: program.publicKey,\n lamports: balanceNeeded - programInfo.lamports,\n }),\n );\n }\n } else {\n transaction = new Transaction().add(\n SystemProgram.createAccount({\n fromPubkey: payer.publicKey,\n newAccountPubkey: program.publicKey,\n lamports: balanceNeeded > 0 ? balanceNeeded : 1,\n space: data.length,\n programId,\n }),\n );\n }\n\n // If the account is already created correctly, skip this step\n // and proceed directly to loading instructions\n if (transaction !== null) {\n await sendAndConfirmTransaction(\n connection,\n transaction,\n [payer, program],\n {\n commitment: 'confirmed',\n },\n );\n }\n }\n\n const dataLayout = BufferLayout.struct<\n Readonly<{\n bytes: number[];\n bytesLength: number;\n bytesLengthPadding: number;\n instruction: number;\n offset: number;\n }>\n >([\n BufferLayout.u32('instruction'),\n BufferLayout.u32('offset'),\n BufferLayout.u32('bytesLength'),\n BufferLayout.u32('bytesLengthPadding'),\n BufferLayout.seq(\n BufferLayout.u8('byte'),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'bytes',\n ),\n ]);\n\n const chunkSize = Loader.chunkSize;\n let offset = 0;\n let array = data;\n let transactions = [];\n while (array.length > 0) {\n const bytes = array.slice(0, chunkSize);\n const data = Buffer.alloc(chunkSize + 16);\n dataLayout.encode(\n {\n instruction: 0, // Load instruction\n offset,\n bytes: bytes as number[],\n bytesLength: 0,\n bytesLengthPadding: 0,\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [{pubkey: program.publicKey, isSigner: true, isWritable: true}],\n programId,\n data,\n });\n transactions.push(\n sendAndConfirmTransaction(connection, transaction, [payer, program], {\n commitment: 'confirmed',\n }),\n );\n\n // Delay between sends in an attempt to reduce rate limit errors\n if (connection._rpcEndpoint.includes('solana.com')) {\n const REQUESTS_PER_SECOND = 4;\n await sleep(1000 / REQUESTS_PER_SECOND);\n }\n\n offset += chunkSize;\n array = array.slice(chunkSize);\n }\n await Promise.all(transactions);\n\n // Finalize the account loaded with program data for execution\n {\n const dataLayout = BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]);\n\n const data = Buffer.alloc(dataLayout.span);\n dataLayout.encode(\n {\n instruction: 1, // Finalize instruction\n },\n data,\n );\n\n const transaction = new Transaction().add({\n keys: [\n {pubkey: program.publicKey, isSigner: true, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId,\n data,\n });\n const deployCommitment = 'processed';\n const finalizeSignature = await connection.sendTransaction(\n transaction,\n [payer, program],\n {preflightCommitment: deployCommitment},\n );\n const {context, value} = await connection.confirmTransaction(\n {\n signature: finalizeSignature,\n lastValidBlockHeight: transaction.lastValidBlockHeight!,\n blockhash: transaction.recentBlockhash!,\n },\n deployCommitment,\n );\n if (value.err) {\n throw new Error(\n `Transaction ${finalizeSignature} failed (${JSON.stringify(value)})`,\n );\n }\n // We prevent programs from being usable until the slot after their deployment.\n // See https://github.com/solana-labs/solana/pull/29654\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n try {\n const currentSlot = await connection.getSlot({\n commitment: deployCommitment,\n });\n if (currentSlot > context.slot) {\n break;\n }\n } catch {\n /* empty */\n }\n await new Promise(resolve =>\n setTimeout(resolve, Math.round(MS_PER_SLOT / 2)),\n );\n }\n }\n\n // success\n return true;\n }\n}\n","import type {Buffer} from 'buffer';\n\nimport {PublicKey} from './publickey';\nimport {Loader} from './loader';\nimport type {Connection} from './connection';\nimport type {Signer} from './keypair';\n\n/**\n * @deprecated Deprecated since Solana v1.17.20.\n */\nexport const BPF_LOADER_PROGRAM_ID = new PublicKey(\n 'BPFLoader2111111111111111111111111111111111',\n);\n\n/**\n * Factory class for transactions to interact with a program loader\n *\n * @deprecated Deprecated since Solana v1.17.20.\n */\nexport class BpfLoader {\n /**\n * Minimum number of signatures required to load a program not including\n * retries\n *\n * Can be used to calculate transaction fees\n */\n static getMinNumSignatures(dataLength: number): number {\n return Loader.getMinNumSignatures(dataLength);\n }\n\n /**\n * Load a SBF program\n *\n * @param connection The connection to use\n * @param payer Account that will pay program loading fees\n * @param program Account to load the program into\n * @param elf The entire ELF containing the SBF program\n * @param loaderProgramId The program id of the BPF loader to use\n * @return true if program was loaded successfully, false if program was already loaded\n */\n static load(\n connection: Connection,\n payer: Signer,\n program: Signer,\n elf: Buffer | Uint8Array | Array,\n loaderProgramId: PublicKey,\n ): Promise {\n return Loader.load(connection, payer, program, loaderProgramId, elf);\n }\n}\n","var objToString = Object.prototype.toString;\nvar objKeys = Object.keys || function(obj) {\n\t\tvar keys = [];\n\t\tfor (var name in obj) {\n\t\t\tkeys.push(name);\n\t\t}\n\t\treturn keys;\n\t};\n\nfunction stringify(val, isArrayProp) {\n\tvar i, max, str, keys, key, propVal, toStr;\n\tif (val === true) {\n\t\treturn \"true\";\n\t}\n\tif (val === false) {\n\t\treturn \"false\";\n\t}\n\tswitch (typeof val) {\n\t\tcase \"object\":\n\t\t\tif (val === null) {\n\t\t\t\treturn null;\n\t\t\t} else if (val.toJSON && typeof val.toJSON === \"function\") {\n\t\t\t\treturn stringify(val.toJSON(), isArrayProp);\n\t\t\t} else {\n\t\t\t\ttoStr = objToString.call(val);\n\t\t\t\tif (toStr === \"[object Array]\") {\n\t\t\t\t\tstr = '[';\n\t\t\t\t\tmax = val.length - 1;\n\t\t\t\t\tfor(i = 0; i < max; i++) {\n\t\t\t\t\t\tstr += stringify(val[i], true) + ',';\n\t\t\t\t\t}\n\t\t\t\t\tif (max > -1) {\n\t\t\t\t\t\tstr += stringify(val[i], true);\n\t\t\t\t\t}\n\t\t\t\t\treturn str + ']';\n\t\t\t\t} else if (toStr === \"[object Object]\") {\n\t\t\t\t\t// only object is left\n\t\t\t\t\tkeys = objKeys(val).sort();\n\t\t\t\t\tmax = keys.length;\n\t\t\t\t\tstr = \"\";\n\t\t\t\t\ti = 0;\n\t\t\t\t\twhile (i < max) {\n\t\t\t\t\t\tkey = keys[i];\n\t\t\t\t\t\tpropVal = stringify(val[key], false);\n\t\t\t\t\t\tif (propVal !== undefined) {\n\t\t\t\t\t\t\tif (str) {\n\t\t\t\t\t\t\t\tstr += ',';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tstr += JSON.stringify(key) + ':' + propVal;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ti++;\n\t\t\t\t\t}\n\t\t\t\t\treturn '{' + str + '}';\n\t\t\t\t} else {\n\t\t\t\t\treturn JSON.stringify(val);\n\t\t\t\t}\n\t\t\t}\n\t\tcase \"function\":\n\t\tcase \"undefined\":\n\t\t\treturn isArrayProp ? null : undefined;\n\t\tcase \"string\":\n\t\t\treturn JSON.stringify(val);\n\t\tdefault:\n\t\t\treturn isFinite(val) ? val : null;\n\t}\n}\n\nmodule.exports = function(val) {\n\tvar returnVal = stringify(val, false);\n\tif (returnVal !== undefined) {\n\t\treturn ''+ returnVal;\n\t}\n};\n","/**\n * A `StructFailure` represents a single specific failure in validation.\n */\n/**\n * `StructError` objects are thrown (or returned) when validation fails.\n *\n * Validation logic is design to exit early for maximum performance. The error\n * represents the first error encountered during validation. For more detail,\n * the `error.failures` property is a generator function that can be run to\n * continue validation and receive all the failures in the data.\n */\nclass StructError extends TypeError {\n constructor(failure, failures) {\n let cached;\n const { message, explanation, ...rest } = failure;\n const { path } = failure;\n const msg = path.length === 0 ? message : `At path: ${path.join('.')} -- ${message}`;\n super(explanation ?? msg);\n if (explanation != null)\n this.cause = msg;\n Object.assign(this, rest);\n this.name = this.constructor.name;\n this.failures = () => {\n return (cached ?? (cached = [failure, ...failures()]));\n };\n }\n}\n\n/**\n * Check if a value is an iterator.\n */\nfunction isIterable(x) {\n return isObject(x) && typeof x[Symbol.iterator] === 'function';\n}\n/**\n * Check if a value is a plain object.\n */\nfunction isObject(x) {\n return typeof x === 'object' && x != null;\n}\n/**\n * Check if a value is a non-array object.\n */\nfunction isNonArrayObject(x) {\n return isObject(x) && !Array.isArray(x);\n}\n/**\n * Check if a value is a plain object.\n */\nfunction isPlainObject(x) {\n if (Object.prototype.toString.call(x) !== '[object Object]') {\n return false;\n }\n const prototype = Object.getPrototypeOf(x);\n return prototype === null || prototype === Object.prototype;\n}\n/**\n * Return a value as a printable string.\n */\nfunction print(value) {\n if (typeof value === 'symbol') {\n return value.toString();\n }\n return typeof value === 'string' ? JSON.stringify(value) : `${value}`;\n}\n/**\n * Shifts (removes and returns) the first value from the `input` iterator.\n * Like `Array.prototype.shift()` but for an `Iterator`.\n */\nfunction shiftIterator(input) {\n const { done, value } = input.next();\n return done ? undefined : value;\n}\n/**\n * Convert a single validation result to a failure.\n */\nfunction toFailure(result, context, struct, value) {\n if (result === true) {\n return;\n }\n else if (result === false) {\n result = {};\n }\n else if (typeof result === 'string') {\n result = { message: result };\n }\n const { path, branch } = context;\n const { type } = struct;\n const { refinement, message = `Expected a value of type \\`${type}\\`${refinement ? ` with refinement \\`${refinement}\\`` : ''}, but received: \\`${print(value)}\\``, } = result;\n return {\n value,\n type,\n refinement,\n key: path[path.length - 1],\n path,\n branch,\n ...result,\n message,\n };\n}\n/**\n * Convert a validation result to an iterable of failures.\n */\nfunction* toFailures(result, context, struct, value) {\n if (!isIterable(result)) {\n result = [result];\n }\n for (const r of result) {\n const failure = toFailure(r, context, struct, value);\n if (failure) {\n yield failure;\n }\n }\n}\n/**\n * Check a value against a struct, traversing deeply into nested values, and\n * returning an iterator of failures or success.\n */\nfunction* run(value, struct, options = {}) {\n const { path = [], branch = [value], coerce = false, mask = false } = options;\n const ctx = { path, branch, mask };\n if (coerce) {\n value = struct.coercer(value, ctx);\n }\n let status = 'valid';\n for (const failure of struct.validator(value, ctx)) {\n failure.explanation = options.message;\n status = 'not_valid';\n yield [failure, undefined];\n }\n for (let [k, v, s] of struct.entries(value, ctx)) {\n const ts = run(v, s, {\n path: k === undefined ? path : [...path, k],\n branch: k === undefined ? branch : [...branch, v],\n coerce,\n mask,\n message: options.message,\n });\n for (const t of ts) {\n if (t[0]) {\n status = t[0].refinement != null ? 'not_refined' : 'not_valid';\n yield [t[0], undefined];\n }\n else if (coerce) {\n v = t[1];\n if (k === undefined) {\n value = v;\n }\n else if (value instanceof Map) {\n value.set(k, v);\n }\n else if (value instanceof Set) {\n value.add(v);\n }\n else if (isObject(value)) {\n if (v !== undefined || k in value)\n value[k] = v;\n }\n }\n }\n }\n if (status !== 'not_valid') {\n for (const failure of struct.refiner(value, ctx)) {\n failure.explanation = options.message;\n status = 'not_refined';\n yield [failure, undefined];\n }\n }\n if (status === 'valid') {\n yield [undefined, value];\n }\n}\n\n/**\n * `Struct` objects encapsulate the validation logic for a specific type of\n * values. Once constructed, you use the `assert`, `is` or `validate` helpers to\n * validate unknown input data against the struct.\n */\nclass Struct {\n constructor(props) {\n const { type, schema, validator, refiner, coercer = (value) => value, entries = function* () { }, } = props;\n this.type = type;\n this.schema = schema;\n this.entries = entries;\n this.coercer = coercer;\n if (validator) {\n this.validator = (value, context) => {\n const result = validator(value, context);\n return toFailures(result, context, this, value);\n };\n }\n else {\n this.validator = () => [];\n }\n if (refiner) {\n this.refiner = (value, context) => {\n const result = refiner(value, context);\n return toFailures(result, context, this, value);\n };\n }\n else {\n this.refiner = () => [];\n }\n }\n /**\n * Assert that a value passes the struct's validation, throwing if it doesn't.\n */\n assert(value, message) {\n return assert(value, this, message);\n }\n /**\n * Create a value with the struct's coercion logic, then validate it.\n */\n create(value, message) {\n return create(value, this, message);\n }\n /**\n * Check if a value passes the struct's validation.\n */\n is(value) {\n return is(value, this);\n }\n /**\n * Mask a value, coercing and validating it, but returning only the subset of\n * properties defined by the struct's schema. Masking applies recursively to\n * props of `object` structs only.\n */\n mask(value, message) {\n return mask(value, this, message);\n }\n /**\n * Validate a value with the struct's validation logic, returning a tuple\n * representing the result.\n *\n * You may optionally pass `true` for the `coerce` argument to coerce\n * the value before attempting to validate it. If you do, the result will\n * contain the coerced result when successful. Also, `mask` will turn on\n * masking of the unknown `object` props recursively if passed.\n */\n validate(value, options = {}) {\n return validate(value, this, options);\n }\n}\n/**\n * Assert that a value passes a struct, throwing if it doesn't.\n */\nfunction assert(value, struct, message) {\n const result = validate(value, struct, { message });\n if (result[0]) {\n throw result[0];\n }\n}\n/**\n * Create a value with the coercion logic of struct and validate it.\n */\nfunction create(value, struct, message) {\n const result = validate(value, struct, { coerce: true, message });\n if (result[0]) {\n throw result[0];\n }\n else {\n return result[1];\n }\n}\n/**\n * Mask a value, returning only the subset of properties defined by a struct.\n */\nfunction mask(value, struct, message) {\n const result = validate(value, struct, { coerce: true, mask: true, message });\n if (result[0]) {\n throw result[0];\n }\n else {\n return result[1];\n }\n}\n/**\n * Check if a value passes a struct.\n */\nfunction is(value, struct) {\n const result = validate(value, struct);\n return !result[0];\n}\n/**\n * Validate a value against a struct, returning an error if invalid, or the\n * value (with potential coercion) if valid.\n */\nfunction validate(value, struct, options = {}) {\n const tuples = run(value, struct, options);\n const tuple = shiftIterator(tuples);\n if (tuple[0]) {\n const error = new StructError(tuple[0], function* () {\n for (const t of tuples) {\n if (t[0]) {\n yield t[0];\n }\n }\n });\n return [error, undefined];\n }\n else {\n const v = tuple[1];\n return [undefined, v];\n }\n}\n\nfunction assign(...Structs) {\n const isType = Structs[0].type === 'type';\n const schemas = Structs.map((s) => s.schema);\n const schema = Object.assign({}, ...schemas);\n return isType ? type(schema) : object(schema);\n}\n/**\n * Define a new struct type with a custom validation function.\n */\nfunction define(name, validator) {\n return new Struct({ type: name, schema: null, validator });\n}\n/**\n * Create a new struct based on an existing struct, but the value is allowed to\n * be `undefined`. `log` will be called if the value is not `undefined`.\n */\nfunction deprecated(struct, log) {\n return new Struct({\n ...struct,\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n validator(value, ctx) {\n if (value === undefined) {\n return true;\n }\n else {\n log(value, ctx);\n return struct.validator(value, ctx);\n }\n },\n });\n}\n/**\n * Create a struct with dynamic validation logic.\n *\n * The callback will receive the value currently being validated, and must\n * return a struct object to validate it with. This can be useful to model\n * validation logic that changes based on its input.\n */\nfunction dynamic(fn) {\n return new Struct({\n type: 'dynamic',\n schema: null,\n *entries(value, ctx) {\n const struct = fn(value, ctx);\n yield* struct.entries(value, ctx);\n },\n validator(value, ctx) {\n const struct = fn(value, ctx);\n return struct.validator(value, ctx);\n },\n coercer(value, ctx) {\n const struct = fn(value, ctx);\n return struct.coercer(value, ctx);\n },\n refiner(value, ctx) {\n const struct = fn(value, ctx);\n return struct.refiner(value, ctx);\n },\n });\n}\n/**\n * Create a struct with lazily evaluated validation logic.\n *\n * The first time validation is run with the struct, the callback will be called\n * and must return a struct object to use. This is useful for cases where you\n * want to have self-referential structs for nested data structures to avoid a\n * circular definition problem.\n */\nfunction lazy(fn) {\n let struct;\n return new Struct({\n type: 'lazy',\n schema: null,\n *entries(value, ctx) {\n struct ?? (struct = fn());\n yield* struct.entries(value, ctx);\n },\n validator(value, ctx) {\n struct ?? (struct = fn());\n return struct.validator(value, ctx);\n },\n coercer(value, ctx) {\n struct ?? (struct = fn());\n return struct.coercer(value, ctx);\n },\n refiner(value, ctx) {\n struct ?? (struct = fn());\n return struct.refiner(value, ctx);\n },\n });\n}\n/**\n * Create a new struct based on an existing object struct, but excluding\n * specific properties.\n *\n * Like TypeScript's `Omit` utility.\n */\nfunction omit(struct, keys) {\n const { schema } = struct;\n const subschema = { ...schema };\n for (const key of keys) {\n delete subschema[key];\n }\n switch (struct.type) {\n case 'type':\n return type(subschema);\n default:\n return object(subschema);\n }\n}\n/**\n * Create a new struct based on an existing object struct, but with all of its\n * properties allowed to be `undefined`.\n *\n * Like TypeScript's `Partial` utility.\n */\nfunction partial(struct) {\n const isStruct = struct instanceof Struct;\n const schema = isStruct ? { ...struct.schema } : { ...struct };\n for (const key in schema) {\n schema[key] = optional(schema[key]);\n }\n if (isStruct && struct.type === 'type') {\n return type(schema);\n }\n return object(schema);\n}\n/**\n * Create a new struct based on an existing object struct, but only including\n * specific properties.\n *\n * Like TypeScript's `Pick` utility.\n */\nfunction pick(struct, keys) {\n const { schema } = struct;\n const subschema = {};\n for (const key of keys) {\n subschema[key] = schema[key];\n }\n switch (struct.type) {\n case 'type':\n return type(subschema);\n default:\n return object(subschema);\n }\n}\n/**\n * Define a new struct type with a custom validation function.\n *\n * @deprecated This function has been renamed to `define`.\n */\nfunction struct(name, validator) {\n console.warn('superstruct@0.11 - The `struct` helper has been renamed to `define`.');\n return define(name, validator);\n}\n\n/**\n * Ensure that any value passes validation.\n */\nfunction any() {\n return define('any', () => true);\n}\nfunction array(Element) {\n return new Struct({\n type: 'array',\n schema: Element,\n *entries(value) {\n if (Element && Array.isArray(value)) {\n for (const [i, v] of value.entries()) {\n yield [i, v, Element];\n }\n }\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n validator(value) {\n return (Array.isArray(value) ||\n `Expected an array value, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a bigint.\n */\nfunction bigint() {\n return define('bigint', (value) => {\n return typeof value === 'bigint';\n });\n}\n/**\n * Ensure that a value is a boolean.\n */\nfunction boolean() {\n return define('boolean', (value) => {\n return typeof value === 'boolean';\n });\n}\n/**\n * Ensure that a value is a valid `Date`.\n *\n * Note: this also ensures that the value is *not* an invalid `Date` object,\n * which can occur when parsing a date fails but still returns a `Date`.\n */\nfunction date() {\n return define('date', (value) => {\n return ((value instanceof Date && !isNaN(value.getTime())) ||\n `Expected a valid \\`Date\\` object, but received: ${print(value)}`);\n });\n}\nfunction enums(values) {\n const schema = {};\n const description = values.map((v) => print(v)).join();\n for (const key of values) {\n schema[key] = key;\n }\n return new Struct({\n type: 'enums',\n schema,\n validator(value) {\n return (values.includes(value) ||\n `Expected one of \\`${description}\\`, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a function.\n */\nfunction func() {\n return define('func', (value) => {\n return (typeof value === 'function' ||\n `Expected a function, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an instance of a specific class.\n */\nfunction instance(Class) {\n return define('instance', (value) => {\n return (value instanceof Class ||\n `Expected a \\`${Class.name}\\` instance, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is an integer.\n */\nfunction integer() {\n return define('integer', (value) => {\n return ((typeof value === 'number' && !isNaN(value) && Number.isInteger(value)) ||\n `Expected an integer, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value matches all of a set of types.\n */\nfunction intersection(Structs) {\n return new Struct({\n type: 'intersection',\n schema: null,\n *entries(value, ctx) {\n for (const S of Structs) {\n yield* S.entries(value, ctx);\n }\n },\n *validator(value, ctx) {\n for (const S of Structs) {\n yield* S.validator(value, ctx);\n }\n },\n *refiner(value, ctx) {\n for (const S of Structs) {\n yield* S.refiner(value, ctx);\n }\n },\n });\n}\nfunction literal(constant) {\n const description = print(constant);\n const t = typeof constant;\n return new Struct({\n type: 'literal',\n schema: t === 'string' || t === 'number' || t === 'boolean' ? constant : null,\n validator(value) {\n return (value === constant ||\n `Expected the literal \\`${description}\\`, but received: ${print(value)}`);\n },\n });\n}\nfunction map(Key, Value) {\n return new Struct({\n type: 'map',\n schema: null,\n *entries(value) {\n if (Key && Value && value instanceof Map) {\n for (const [k, v] of value.entries()) {\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n coercer(value) {\n return value instanceof Map ? new Map(value) : value;\n },\n validator(value) {\n return (value instanceof Map ||\n `Expected a \\`Map\\` object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that no value ever passes validation.\n */\nfunction never() {\n return define('never', () => false);\n}\n/**\n * Augment an existing struct to allow `null` values.\n */\nfunction nullable(struct) {\n return new Struct({\n ...struct,\n validator: (value, ctx) => value === null || struct.validator(value, ctx),\n refiner: (value, ctx) => value === null || struct.refiner(value, ctx),\n });\n}\n/**\n * Ensure that a value is a number.\n */\nfunction number() {\n return define('number', (value) => {\n return ((typeof value === 'number' && !isNaN(value)) ||\n `Expected a number, but received: ${print(value)}`);\n });\n}\nfunction object(schema) {\n const knowns = schema ? Object.keys(schema) : [];\n const Never = never();\n return new Struct({\n type: 'object',\n schema: schema ? schema : null,\n *entries(value) {\n if (schema && isObject(value)) {\n const unknowns = new Set(Object.keys(value));\n for (const key of knowns) {\n unknowns.delete(key);\n yield [key, value[key], schema[key]];\n }\n for (const key of unknowns) {\n yield [key, value[key], Never];\n }\n }\n },\n validator(value) {\n return (isNonArrayObject(value) ||\n `Expected an object, but received: ${print(value)}`);\n },\n coercer(value, ctx) {\n if (!isNonArrayObject(value)) {\n return value;\n }\n const coerced = { ...value };\n // The `object` struct has special behaviour enabled by the mask flag.\n // When masking, properties that are not in the schema are deleted from\n // the coerced object instead of eventually failing validaiton.\n if (ctx.mask && schema) {\n for (const key in coerced) {\n if (schema[key] === undefined) {\n delete coerced[key];\n }\n }\n }\n return coerced;\n },\n });\n}\n/**\n * Augment a struct to allow `undefined` values.\n */\nfunction optional(struct) {\n return new Struct({\n ...struct,\n validator: (value, ctx) => value === undefined || struct.validator(value, ctx),\n refiner: (value, ctx) => value === undefined || struct.refiner(value, ctx),\n });\n}\n/**\n * Ensure that a value is an object with keys and values of specific types, but\n * without ensuring any specific shape of properties.\n *\n * Like TypeScript's `Record` utility.\n */\nfunction record(Key, Value) {\n return new Struct({\n type: 'record',\n schema: null,\n *entries(value) {\n if (isObject(value)) {\n for (const k in value) {\n const v = value[k];\n yield [k, k, Key];\n yield [k, v, Value];\n }\n }\n },\n validator(value) {\n return (isNonArrayObject(value) ||\n `Expected an object, but received: ${print(value)}`);\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n },\n });\n}\n/**\n * Ensure that a value is a `RegExp`.\n *\n * Note: this does not test the value against the regular expression! For that\n * you need to use the `pattern()` refinement.\n */\nfunction regexp() {\n return define('regexp', (value) => {\n return value instanceof RegExp;\n });\n}\nfunction set(Element) {\n return new Struct({\n type: 'set',\n schema: null,\n *entries(value) {\n if (Element && value instanceof Set) {\n for (const v of value) {\n yield [v, v, Element];\n }\n }\n },\n coercer(value) {\n return value instanceof Set ? new Set(value) : value;\n },\n validator(value) {\n return (value instanceof Set ||\n `Expected a \\`Set\\` object, but received: ${print(value)}`);\n },\n });\n}\n/**\n * Ensure that a value is a string.\n */\nfunction string() {\n return define('string', (value) => {\n return (typeof value === 'string' ||\n `Expected a string, but received: ${print(value)}`);\n });\n}\n/**\n * Ensure that a value is a tuple of a specific length, and that each of its\n * elements is of a specific type.\n */\nfunction tuple(Structs) {\n const Never = never();\n return new Struct({\n type: 'tuple',\n schema: null,\n *entries(value) {\n if (Array.isArray(value)) {\n const length = Math.max(Structs.length, value.length);\n for (let i = 0; i < length; i++) {\n yield [i, value[i], Structs[i] || Never];\n }\n }\n },\n validator(value) {\n return (Array.isArray(value) ||\n `Expected an array, but received: ${print(value)}`);\n },\n coercer(value) {\n return Array.isArray(value) ? value.slice() : value;\n },\n });\n}\n/**\n * Ensure that a value has a set of known properties of specific types.\n *\n * Note: Unrecognized properties are allowed and untouched. This is similar to\n * how TypeScript's structural typing works.\n */\nfunction type(schema) {\n const keys = Object.keys(schema);\n return new Struct({\n type: 'type',\n schema,\n *entries(value) {\n if (isObject(value)) {\n for (const k of keys) {\n yield [k, value[k], schema[k]];\n }\n }\n },\n validator(value) {\n return (isNonArrayObject(value) ||\n `Expected an object, but received: ${print(value)}`);\n },\n coercer(value) {\n return isNonArrayObject(value) ? { ...value } : value;\n },\n });\n}\n/**\n * Ensure that a value matches one of a set of types.\n */\nfunction union(Structs) {\n const description = Structs.map((s) => s.type).join(' | ');\n return new Struct({\n type: 'union',\n schema: null,\n coercer(value, ctx) {\n for (const S of Structs) {\n const [error, coerced] = S.validate(value, {\n coerce: true,\n mask: ctx.mask,\n });\n if (!error) {\n return coerced;\n }\n }\n return value;\n },\n validator(value, ctx) {\n const failures = [];\n for (const S of Structs) {\n const [...tuples] = run(value, S, ctx);\n const [first] = tuples;\n if (!first[0]) {\n return [];\n }\n else {\n for (const [failure] of tuples) {\n if (failure) {\n failures.push(failure);\n }\n }\n }\n }\n return [\n `Expected the value to satisfy a union of \\`${description}\\`, but received: ${print(value)}`,\n ...failures,\n ];\n },\n });\n}\n/**\n * Ensure that any value passes validation, without widening its type to `any`.\n */\nfunction unknown() {\n return define('unknown', () => true);\n}\n\n/**\n * Augment a `Struct` to add an additional coercion step to its input.\n *\n * This allows you to transform input data before validating it, to increase the\n * likelihood that it passes validation—for example for default values, parsing\n * different formats, etc.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction coerce(struct, condition, coercer) {\n return new Struct({\n ...struct,\n coercer: (value, ctx) => {\n return is(value, condition)\n ? struct.coercer(coercer(value, ctx), ctx)\n : struct.coercer(value, ctx);\n },\n });\n}\n/**\n * Augment a struct to replace `undefined` values with a default.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction defaulted(struct, fallback, options = {}) {\n return coerce(struct, unknown(), (x) => {\n const f = typeof fallback === 'function' ? fallback() : fallback;\n if (x === undefined) {\n return f;\n }\n if (!options.strict && isPlainObject(x) && isPlainObject(f)) {\n const ret = { ...x };\n let changed = false;\n for (const key in f) {\n if (ret[key] === undefined) {\n ret[key] = f[key];\n changed = true;\n }\n }\n if (changed) {\n return ret;\n }\n }\n return x;\n });\n}\n/**\n * Augment a struct to trim string inputs.\n *\n * Note: You must use `create(value, Struct)` on the value to have the coercion\n * take effect! Using simply `assert()` or `is()` will not use coercion.\n */\nfunction trimmed(struct) {\n return coerce(struct, string(), (x) => x.trim());\n}\n\n/**\n * Ensure that a string, array, map, or set is empty.\n */\nfunction empty(struct) {\n return refine(struct, 'empty', (value) => {\n const size = getSize(value);\n return (size === 0 ||\n `Expected an empty ${struct.type} but received one with a size of \\`${size}\\``);\n });\n}\nfunction getSize(value) {\n if (value instanceof Map || value instanceof Set) {\n return value.size;\n }\n else {\n return value.length;\n }\n}\n/**\n * Ensure that a number or date is below a threshold.\n */\nfunction max(struct, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct, 'max', (value) => {\n return exclusive\n ? value < threshold\n : value <= threshold ||\n `Expected a ${struct.type} less than ${exclusive ? '' : 'or equal to '}${threshold} but received \\`${value}\\``;\n });\n}\n/**\n * Ensure that a number or date is above a threshold.\n */\nfunction min(struct, threshold, options = {}) {\n const { exclusive } = options;\n return refine(struct, 'min', (value) => {\n return exclusive\n ? value > threshold\n : value >= threshold ||\n `Expected a ${struct.type} greater than ${exclusive ? '' : 'or equal to '}${threshold} but received \\`${value}\\``;\n });\n}\n/**\n * Ensure that a string, array, map or set is not empty.\n */\nfunction nonempty(struct) {\n return refine(struct, 'nonempty', (value) => {\n const size = getSize(value);\n return (size > 0 || `Expected a nonempty ${struct.type} but received an empty one`);\n });\n}\n/**\n * Ensure that a string matches a regular expression.\n */\nfunction pattern(struct, regexp) {\n return refine(struct, 'pattern', (value) => {\n return (regexp.test(value) ||\n `Expected a ${struct.type} matching \\`/${regexp.source}/\\` but received \"${value}\"`);\n });\n}\n/**\n * Ensure that a string, array, number, date, map, or set has a size (or length, or time) between `min` and `max`.\n */\nfunction size(struct, min, max = min) {\n const expected = `Expected a ${struct.type}`;\n const of = min === max ? `of \\`${min}\\`` : `between \\`${min}\\` and \\`${max}\\``;\n return refine(struct, 'size', (value) => {\n if (typeof value === 'number' || value instanceof Date) {\n return ((min <= value && value <= max) ||\n `${expected} ${of} but received \\`${value}\\``);\n }\n else if (value instanceof Map || value instanceof Set) {\n const { size } = value;\n return ((min <= size && size <= max) ||\n `${expected} with a size ${of} but received one with a size of \\`${size}\\``);\n }\n else {\n const { length } = value;\n return ((min <= length && length <= max) ||\n `${expected} with a length ${of} but received one with a length of \\`${length}\\``);\n }\n });\n}\n/**\n * Augment a `Struct` to add an additional refinement to the validation.\n *\n * The refiner function is guaranteed to receive a value of the struct's type,\n * because the struct's existing validation will already have passed. This\n * allows you to layer additional validation on top of existing structs.\n */\nfunction refine(struct, name, refiner) {\n return new Struct({\n ...struct,\n *refiner(value, ctx) {\n yield* struct.refiner(value, ctx);\n const result = refiner(value, ctx);\n const failures = toFailures(result, ctx, struct, value);\n for (const failure of failures) {\n yield { ...failure, refinement: name };\n }\n },\n });\n}\n\nexport { Struct, StructError, any, array, assert, assign, bigint, boolean, coerce, create, date, defaulted, define, deprecated, dynamic, empty, enums, func, instance, integer, intersection, is, lazy, literal, map, mask, max, min, never, nonempty, nullable, number, object, omit, optional, partial, pattern, pick, record, refine, regexp, set, size, string, struct, trimmed, tuple, type, union, unknown, validate };\n//# sourceMappingURL=index.mjs.map\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'; // **`v1()` - Generate time-based UUID**\n//\n// Inspired by https://github.com/LiosK/UUID.js\n// and http://docs.python.org/library/uuid.html\n\nvar _nodeId;\n\nvar _clockseq; // Previous uuid creation time\n\n\nvar _lastMSecs = 0;\nvar _lastNSecs = 0; // See https://github.com/uuidjs/uuid for API details\n\nfunction v1(options, buf, offset) {\n var i = buf && offset || 0;\n var b = buf || new Array(16);\n options = options || {};\n var node = options.node || _nodeId;\n var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq; // node and clockseq need to be initialized to random values if they're not\n // specified. We do this lazily to minimize issues related to insufficient\n // system entropy. See #189\n\n if (node == null || clockseq == null) {\n var seedBytes = options.random || (options.rng || rng)();\n\n if (node == null) {\n // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)\n node = _nodeId = [seedBytes[0] | 0x01, seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]];\n }\n\n if (clockseq == null) {\n // Per 4.2.2, randomize (14 bit) clockseq\n clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;\n }\n } // UUID timestamps are 100 nano-second units since the Gregorian epoch,\n // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so\n // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'\n // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.\n\n\n var msecs = options.msecs !== undefined ? options.msecs : Date.now(); // Per 4.2.1.2, use count of uuid's generated during the current clock\n // cycle to simulate higher resolution clock\n\n var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1; // Time since last uuid creation (in msecs)\n\n var dt = msecs - _lastMSecs + (nsecs - _lastNSecs) / 10000; // Per 4.2.1.2, Bump clockseq on clock regression\n\n if (dt < 0 && options.clockseq === undefined) {\n clockseq = clockseq + 1 & 0x3fff;\n } // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new\n // time interval\n\n\n if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {\n nsecs = 0;\n } // Per 4.2.1.2 Throw error if too many uuids are requested\n\n\n if (nsecs >= 10000) {\n throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");\n }\n\n _lastMSecs = msecs;\n _lastNSecs = nsecs;\n _clockseq = clockseq; // Per 4.1.4 - Convert from unix epoch to Gregorian epoch\n\n msecs += 12219292800000; // `time_low`\n\n var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;\n b[i++] = tl >>> 24 & 0xff;\n b[i++] = tl >>> 16 & 0xff;\n b[i++] = tl >>> 8 & 0xff;\n b[i++] = tl & 0xff; // `time_mid`\n\n var tmh = msecs / 0x100000000 * 10000 & 0xfffffff;\n b[i++] = tmh >>> 8 & 0xff;\n b[i++] = tmh & 0xff; // `time_high_and_version`\n\n b[i++] = tmh >>> 24 & 0xf | 0x10; // include version\n\n b[i++] = tmh >>> 16 & 0xff; // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)\n\n b[i++] = clockseq >>> 8 | 0x80; // `clock_seq_low`\n\n b[i++] = clockseq & 0xff; // `node`\n\n for (var n = 0; n < 6; ++n) {\n b[i + n] = node[n];\n }\n\n return buf || stringify(b);\n}\n\nexport default v1;","import validate from './validate.js';\n\nfunction parse(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n var v;\n var arr = new Uint8Array(16); // Parse ########-....-....-....-............\n\n arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;\n arr[1] = v >>> 16 & 0xff;\n arr[2] = v >>> 8 & 0xff;\n arr[3] = v & 0xff; // Parse ........-####-....-....-............\n\n arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;\n arr[5] = v & 0xff; // Parse ........-....-####-....-............\n\n arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;\n arr[7] = v & 0xff; // Parse ........-....-....-####-............\n\n arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;\n arr[9] = v & 0xff; // Parse ........-....-....-....-############\n // (Use \"/\" to avoid 32-bit truncation when bit-shifting high-order bytes)\n\n arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;\n arr[11] = v / 0x100000000 & 0xff;\n arr[12] = v >>> 24 & 0xff;\n arr[13] = v >>> 16 & 0xff;\n arr[14] = v >>> 8 & 0xff;\n arr[15] = v & 0xff;\n return arr;\n}\n\nexport default parse;","import stringify from './stringify.js';\nimport parse from './parse.js';\n\nfunction stringToBytes(str) {\n str = unescape(encodeURIComponent(str)); // UTF8 escape\n\n var bytes = [];\n\n for (var i = 0; i < str.length; ++i) {\n bytes.push(str.charCodeAt(i));\n }\n\n return bytes;\n}\n\nexport var DNS = '6ba7b810-9dad-11d1-80b4-00c04fd430c8';\nexport var URL = '6ba7b811-9dad-11d1-80b4-00c04fd430c8';\nexport default function (name, version, hashfunc) {\n function generateUUID(value, namespace, buf, offset) {\n if (typeof value === 'string') {\n value = stringToBytes(value);\n }\n\n if (typeof namespace === 'string') {\n namespace = parse(namespace);\n }\n\n if (namespace.length !== 16) {\n throw TypeError('Namespace must be array-like (16 iterable integer values, 0-255)');\n } // Compute hash of namespace and value, Per 4.3\n // Future: Use spread syntax when supported on all platforms, e.g. `bytes =\n // hashfunc([...namespace, ... value])`\n\n\n var bytes = new Uint8Array(16 + value.length);\n bytes.set(namespace);\n bytes.set(value, namespace.length);\n bytes = hashfunc(bytes);\n bytes[6] = bytes[6] & 0x0f | version;\n bytes[8] = bytes[8] & 0x3f | 0x80;\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = bytes[i];\n }\n\n return buf;\n }\n\n return stringify(bytes);\n } // Function#name is not settable on some platforms (#270)\n\n\n try {\n generateUUID.name = name; // eslint-disable-next-line no-empty\n } catch (err) {} // For CommonJS default export support\n\n\n generateUUID.DNS = DNS;\n generateUUID.URL = URL;\n return generateUUID;\n}","/*\n * Browser-compatible JavaScript MD5\n *\n * Modification of JavaScript MD5\n * https://github.com/blueimp/JavaScript-MD5\n *\n * Copyright 2011, Sebastian Tschan\n * https://blueimp.net\n *\n * Licensed under the MIT license:\n * https://opensource.org/licenses/MIT\n *\n * Based on\n * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message\n * Digest Algorithm, as defined in RFC 1321.\n * Version 2.2 Copyright (C) Paul Johnston 1999 - 2009\n * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet\n * Distributed under the BSD License\n * See http://pajhome.org.uk/crypt/md5 for more info.\n */\nfunction md5(bytes) {\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = new Uint8Array(msg.length);\n\n for (var i = 0; i < msg.length; ++i) {\n bytes[i] = msg.charCodeAt(i);\n }\n }\n\n return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));\n}\n/*\n * Convert an array of little-endian words to an array of bytes\n */\n\n\nfunction md5ToHexEncodedArray(input) {\n var output = [];\n var length32 = input.length * 32;\n var hexTab = '0123456789abcdef';\n\n for (var i = 0; i < length32; i += 8) {\n var x = input[i >> 5] >>> i % 32 & 0xff;\n var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);\n output.push(hex);\n }\n\n return output;\n}\n/**\n * Calculate output length with padding and bit length\n */\n\n\nfunction getOutputLength(inputLength8) {\n return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;\n}\n/*\n * Calculate the MD5 of an array of little-endian words, and a bit length.\n */\n\n\nfunction wordsToMd5(x, len) {\n /* append padding */\n x[len >> 5] |= 0x80 << len % 32;\n x[getOutputLength(len) - 1] = len;\n var a = 1732584193;\n var b = -271733879;\n var c = -1732584194;\n var d = 271733878;\n\n for (var i = 0; i < x.length; i += 16) {\n var olda = a;\n var oldb = b;\n var oldc = c;\n var oldd = d;\n a = md5ff(a, b, c, d, x[i], 7, -680876936);\n d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);\n c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);\n b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);\n a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);\n d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);\n c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);\n b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);\n a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);\n d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);\n c = md5ff(c, d, a, b, x[i + 10], 17, -42063);\n b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);\n a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);\n d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);\n c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);\n b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);\n a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);\n d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);\n c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);\n b = md5gg(b, c, d, a, x[i], 20, -373897302);\n a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);\n d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);\n c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);\n b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);\n a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);\n d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);\n c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);\n b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);\n a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);\n d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);\n c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);\n b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);\n a = md5hh(a, b, c, d, x[i + 5], 4, -378558);\n d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);\n c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);\n b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);\n a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);\n d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);\n c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);\n b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);\n a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);\n d = md5hh(d, a, b, c, x[i], 11, -358537222);\n c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);\n b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);\n a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);\n d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);\n c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);\n b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);\n a = md5ii(a, b, c, d, x[i], 6, -198630844);\n d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);\n c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);\n b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);\n a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);\n d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);\n c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);\n b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);\n a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);\n d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);\n c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);\n b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);\n a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);\n d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);\n c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);\n b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);\n a = safeAdd(a, olda);\n b = safeAdd(b, oldb);\n c = safeAdd(c, oldc);\n d = safeAdd(d, oldd);\n }\n\n return [a, b, c, d];\n}\n/*\n * Convert an array bytes to an array of little-endian words\n * Characters >255 have their high-byte silently ignored.\n */\n\n\nfunction bytesToWords(input) {\n if (input.length === 0) {\n return [];\n }\n\n var length8 = input.length * 8;\n var output = new Uint32Array(getOutputLength(length8));\n\n for (var i = 0; i < length8; i += 8) {\n output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;\n }\n\n return output;\n}\n/*\n * Add integers, wrapping at 2^32. This uses 16-bit operations internally\n * to work around bugs in some JS interpreters.\n */\n\n\nfunction safeAdd(x, y) {\n var lsw = (x & 0xffff) + (y & 0xffff);\n var msw = (x >> 16) + (y >> 16) + (lsw >> 16);\n return msw << 16 | lsw & 0xffff;\n}\n/*\n * Bitwise rotate a 32-bit number to the left.\n */\n\n\nfunction bitRotateLeft(num, cnt) {\n return num << cnt | num >>> 32 - cnt;\n}\n/*\n * These functions implement the four basic operations the algorithm uses.\n */\n\n\nfunction md5cmn(q, a, b, x, s, t) {\n return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);\n}\n\nfunction md5ff(a, b, c, d, x, s, t) {\n return md5cmn(b & c | ~b & d, a, b, x, s, t);\n}\n\nfunction md5gg(a, b, c, d, x, s, t) {\n return md5cmn(b & d | c & ~d, a, b, x, s, t);\n}\n\nfunction md5hh(a, b, c, d, x, s, t) {\n return md5cmn(b ^ c ^ d, a, b, x, s, t);\n}\n\nfunction md5ii(a, b, c, d, x, s, t) {\n return md5cmn(c ^ (b | ~d), a, b, x, s, t);\n}\n\nexport default md5;","import v35 from './v35.js';\nimport md5 from './md5.js';\nvar v3 = v35('v3', 0x30, md5);\nexport default v3;","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;","// Adapted from Chris Veness' SHA1 code at\n// http://www.movable-type.co.uk/scripts/sha1.html\nfunction f(s, x, y, z) {\n switch (s) {\n case 0:\n return x & y ^ ~x & z;\n\n case 1:\n return x ^ y ^ z;\n\n case 2:\n return x & y ^ x & z ^ y & z;\n\n case 3:\n return x ^ y ^ z;\n }\n}\n\nfunction ROTL(x, n) {\n return x << n | x >>> 32 - n;\n}\n\nfunction sha1(bytes) {\n var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];\n var H = [0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0];\n\n if (typeof bytes === 'string') {\n var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape\n\n bytes = [];\n\n for (var i = 0; i < msg.length; ++i) {\n bytes.push(msg.charCodeAt(i));\n }\n } else if (!Array.isArray(bytes)) {\n // Convert Array-like to Array\n bytes = Array.prototype.slice.call(bytes);\n }\n\n bytes.push(0x80);\n var l = bytes.length / 4 + 2;\n var N = Math.ceil(l / 16);\n var M = new Array(N);\n\n for (var _i = 0; _i < N; ++_i) {\n var arr = new Uint32Array(16);\n\n for (var j = 0; j < 16; ++j) {\n arr[j] = bytes[_i * 64 + j * 4] << 24 | bytes[_i * 64 + j * 4 + 1] << 16 | bytes[_i * 64 + j * 4 + 2] << 8 | bytes[_i * 64 + j * 4 + 3];\n }\n\n M[_i] = arr;\n }\n\n M[N - 1][14] = (bytes.length - 1) * 8 / Math.pow(2, 32);\n M[N - 1][14] = Math.floor(M[N - 1][14]);\n M[N - 1][15] = (bytes.length - 1) * 8 & 0xffffffff;\n\n for (var _i2 = 0; _i2 < N; ++_i2) {\n var W = new Uint32Array(80);\n\n for (var t = 0; t < 16; ++t) {\n W[t] = M[_i2][t];\n }\n\n for (var _t = 16; _t < 80; ++_t) {\n W[_t] = ROTL(W[_t - 3] ^ W[_t - 8] ^ W[_t - 14] ^ W[_t - 16], 1);\n }\n\n var a = H[0];\n var b = H[1];\n var c = H[2];\n var d = H[3];\n var e = H[4];\n\n for (var _t2 = 0; _t2 < 80; ++_t2) {\n var s = Math.floor(_t2 / 20);\n var T = ROTL(a, 5) + f(s, b, c, d) + e + K[s] + W[_t2] >>> 0;\n e = d;\n d = c;\n c = ROTL(b, 30) >>> 0;\n b = a;\n a = T;\n }\n\n H[0] = H[0] + a >>> 0;\n H[1] = H[1] + b >>> 0;\n H[2] = H[2] + c >>> 0;\n H[3] = H[3] + d >>> 0;\n H[4] = H[4] + e >>> 0;\n }\n\n return [H[0] >> 24 & 0xff, H[0] >> 16 & 0xff, H[0] >> 8 & 0xff, H[0] & 0xff, H[1] >> 24 & 0xff, H[1] >> 16 & 0xff, H[1] >> 8 & 0xff, H[1] & 0xff, H[2] >> 24 & 0xff, H[2] >> 16 & 0xff, H[2] >> 8 & 0xff, H[2] & 0xff, H[3] >> 24 & 0xff, H[3] >> 16 & 0xff, H[3] >> 8 & 0xff, H[3] & 0xff, H[4] >> 24 & 0xff, H[4] >> 16 & 0xff, H[4] >> 8 & 0xff, H[4] & 0xff];\n}\n\nexport default sha1;","import v35 from './v35.js';\nimport sha1 from './sha1.js';\nvar v5 = v35('v5', 0x50, sha1);\nexport default v5;","export default '00000000-0000-0000-0000-000000000000';","import validate from './validate.js';\n\nfunction version(uuid) {\n if (!validate(uuid)) {\n throw TypeError('Invalid UUID');\n }\n\n return parseInt(uuid.substr(14, 1), 16);\n}\n\nexport default version;","'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","'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","const MINIMUM_SLOT_PER_EPOCH = 32;\n\n// Returns the number of trailing zeros in the binary representation of self.\nfunction trailingZeros(n: number) {\n let trailingZeros = 0;\n while (n > 1) {\n n /= 2;\n trailingZeros++;\n }\n return trailingZeros;\n}\n\n// Returns the smallest power of two greater than or equal to n\nfunction nextPowerOfTwo(n: number) {\n if (n === 0) return 1;\n n--;\n n |= n >> 1;\n n |= n >> 2;\n n |= n >> 4;\n n |= n >> 8;\n n |= n >> 16;\n n |= n >> 32;\n return n + 1;\n}\n\n/**\n * Epoch schedule\n * (see https://docs.solana.com/terminology#epoch)\n * Can be retrieved with the {@link Connection.getEpochSchedule} method\n */\nexport class EpochSchedule {\n /** The maximum number of slots in each epoch */\n public slotsPerEpoch: number;\n /** The number of slots before beginning of an epoch to calculate a leader schedule for that epoch */\n public leaderScheduleSlotOffset: number;\n /** Indicates whether epochs start short and grow */\n public warmup: boolean;\n /** The first epoch with `slotsPerEpoch` slots */\n public firstNormalEpoch: number;\n /** The first slot of `firstNormalEpoch` */\n public firstNormalSlot: number;\n\n constructor(\n slotsPerEpoch: number,\n leaderScheduleSlotOffset: number,\n warmup: boolean,\n firstNormalEpoch: number,\n firstNormalSlot: number,\n ) {\n this.slotsPerEpoch = slotsPerEpoch;\n this.leaderScheduleSlotOffset = leaderScheduleSlotOffset;\n this.warmup = warmup;\n this.firstNormalEpoch = firstNormalEpoch;\n this.firstNormalSlot = firstNormalSlot;\n }\n\n getEpoch(slot: number): number {\n return this.getEpochAndSlotIndex(slot)[0];\n }\n\n getEpochAndSlotIndex(slot: number): [number, number] {\n if (slot < this.firstNormalSlot) {\n const epoch =\n trailingZeros(nextPowerOfTwo(slot + MINIMUM_SLOT_PER_EPOCH + 1)) -\n trailingZeros(MINIMUM_SLOT_PER_EPOCH) -\n 1;\n\n const epochLen = this.getSlotsInEpoch(epoch);\n const slotIndex = slot - (epochLen - MINIMUM_SLOT_PER_EPOCH);\n return [epoch, slotIndex];\n } else {\n const normalSlotIndex = slot - this.firstNormalSlot;\n const normalEpochIndex = Math.floor(normalSlotIndex / this.slotsPerEpoch);\n const epoch = this.firstNormalEpoch + normalEpochIndex;\n const slotIndex = normalSlotIndex % this.slotsPerEpoch;\n return [epoch, slotIndex];\n }\n }\n\n getFirstSlotInEpoch(epoch: number): number {\n if (epoch <= this.firstNormalEpoch) {\n return (Math.pow(2, epoch) - 1) * MINIMUM_SLOT_PER_EPOCH;\n } else {\n return (\n (epoch - this.firstNormalEpoch) * this.slotsPerEpoch +\n this.firstNormalSlot\n );\n }\n }\n\n getLastSlotInEpoch(epoch: number): number {\n return this.getFirstSlotInEpoch(epoch) + this.getSlotsInEpoch(epoch) - 1;\n }\n\n getSlotsInEpoch(epoch: number) {\n if (epoch < this.firstNormalEpoch) {\n return Math.pow(2, epoch + trailingZeros(MINIMUM_SLOT_PER_EPOCH));\n } else {\n return this.slotsPerEpoch;\n }\n }\n}\n","export const Headers: typeof globalThis.Headers = globalThis.Headers;\nexport const Request: typeof globalThis.Request = globalThis.Request;\nexport const Response: typeof globalThis.Response = globalThis.Response;\nexport default globalThis.fetch;\n","'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","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","import {\n CommonClient,\n ICommonWebSocket,\n IWSClientAdditionalOptions,\n NodeWebSocketType,\n NodeWebSocketTypeOptions,\n WebSocket as createRpc,\n} from 'rpc-websockets';\n\ninterface IHasReadyState {\n readyState: WebSocket['readyState'];\n}\n\nexport default class RpcWebSocketClient extends CommonClient {\n private underlyingSocket: IHasReadyState | undefined;\n constructor(\n address?: string,\n options?: IWSClientAdditionalOptions & NodeWebSocketTypeOptions,\n generate_request_id?: (\n method: string,\n params: object | Array,\n ) => number,\n ) {\n const webSocketFactory = (url: string) => {\n const rpc = createRpc(url, {\n autoconnect: true,\n max_reconnects: 5,\n reconnect: true,\n reconnect_interval: 1000,\n ...options,\n });\n if ('socket' in rpc) {\n this.underlyingSocket = rpc.socket as ReturnType;\n } else {\n this.underlyingSocket = rpc as NodeWebSocketType;\n }\n return rpc as ICommonWebSocket;\n };\n super(webSocketFactory, address, options, generate_request_id);\n }\n call(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.call(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to call a JSON-RPC method `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n notify(\n ...args: Parameters\n ): ReturnType {\n const readyState = this.underlyingSocket?.readyState;\n if (readyState === 1 /* WebSocket.OPEN */) {\n return super.notify(...args);\n }\n return Promise.reject(\n new Error(\n 'Tried to send a JSON-RPC notification `' +\n args[0] +\n '` but the socket was not `CONNECTING` or `OPEN` (`readyState` was ' +\n readyState +\n ')',\n ),\n );\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nexport interface IAccountStateData {\n readonly typeIndex: number;\n}\n\n/**\n * @internal\n */\nexport type AccountType = {\n /** The account type index (from solana upstream program) */\n index: number;\n /** The BufferLayout to use to build data */\n layout: BufferLayout.Layout;\n};\n\n/**\n * Decode account data buffer using an AccountType\n * @internal\n */\nexport function decodeData(\n type: AccountType,\n data: Uint8Array,\n): TAccountStateData {\n let decoded: TAccountStateData;\n try {\n decoded = type.layout.decode(data);\n } catch (err) {\n throw new Error('invalid instruction; ' + err);\n }\n\n if (decoded.typeIndex !== type.index) {\n throw new Error(\n `invalid account data; account type mismatch ${decoded.typeIndex} != ${type.index}`,\n );\n }\n\n return decoded;\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport assert from '../../utils/assert';\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport {u64} from '../../utils/bigint';\nimport {decodeData} from '../../account-data';\n\nexport type AddressLookupTableState = {\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedSlotStartIndex: number;\n authority?: PublicKey;\n addresses: Array;\n};\n\nexport type AddressLookupTableAccountArgs = {\n key: PublicKey;\n state: AddressLookupTableState;\n};\n\n/// The serialized size of lookup table metadata\nconst LOOKUP_TABLE_META_SIZE = 56;\n\nexport class AddressLookupTableAccount {\n key: PublicKey;\n state: AddressLookupTableState;\n\n constructor(args: AddressLookupTableAccountArgs) {\n this.key = args.key;\n this.state = args.state;\n }\n\n isActive(): boolean {\n const U64_MAX = BigInt('0xffffffffffffffff');\n return this.state.deactivationSlot === U64_MAX;\n }\n\n static deserialize(accountData: Uint8Array): AddressLookupTableState {\n const meta = decodeData(LookupTableMetaLayout, accountData);\n\n const serializedAddressesLen = accountData.length - LOOKUP_TABLE_META_SIZE;\n assert(serializedAddressesLen >= 0, 'lookup table is invalid');\n assert(serializedAddressesLen % 32 === 0, 'lookup table is invalid');\n\n const numSerializedAddresses = serializedAddressesLen / 32;\n const {addresses} = BufferLayout.struct<{addresses: Array}>([\n BufferLayout.seq(Layout.publicKey(), numSerializedAddresses, 'addresses'),\n ]).decode(accountData.slice(LOOKUP_TABLE_META_SIZE));\n\n return {\n deactivationSlot: meta.deactivationSlot,\n lastExtendedSlot: meta.lastExtendedSlot,\n lastExtendedSlotStartIndex: meta.lastExtendedStartIndex,\n authority:\n meta.authority.length !== 0\n ? new PublicKey(meta.authority[0])\n : undefined,\n addresses: addresses.map(address => new PublicKey(address)),\n };\n }\n}\n\nconst LookupTableMetaLayout = {\n index: 1,\n layout: BufferLayout.struct<{\n typeIndex: number;\n deactivationSlot: bigint;\n lastExtendedSlot: number;\n lastExtendedStartIndex: number;\n authority: Array;\n }>([\n BufferLayout.u32('typeIndex'),\n u64('deactivationSlot'),\n BufferLayout.nu64('lastExtendedSlot'),\n BufferLayout.u8('lastExtendedStartIndex'),\n BufferLayout.u8(), // option\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u8(), -1),\n 'authority',\n ),\n ]),\n};\n","const URL_RE = /^[^:]+:\\/\\/([^:[]+|\\[[^\\]]+\\])(:\\d+)?(.*)/i;\n\nexport function makeWebsocketUrl(endpoint: string) {\n const matches = endpoint.match(URL_RE);\n if (matches == null) {\n throw TypeError(`Failed to validate endpoint URL \\`${endpoint}\\``);\n }\n const [\n _, // eslint-disable-line @typescript-eslint/no-unused-vars\n hostish,\n portWithColon,\n rest,\n ] = matches;\n const protocol = endpoint.startsWith('https:') ? 'wss:' : 'ws:';\n const startPort =\n portWithColon == null ? null : parseInt(portWithColon.slice(1), 10);\n const websocketPort =\n // Only shift the port by +1 as a convention for ws(s) only if given endpoint\n // is explicitly specifying the endpoint port (HTTP-based RPC), assuming\n // we're directly trying to connect to agave-validator's ws listening port.\n // When the endpoint omits the port, we're connecting to the protocol\n // default ports: http(80) or https(443) and it's assumed we're behind a reverse\n // proxy which manages WebSocket upgrade and backend port redirection.\n startPort == null ? '' : `:${startPort + 1}`;\n return `${protocol}//${hostish}${websocketPort}${rest}`;\n}\n","import HttpKeepAliveAgent, {\n HttpsAgent as HttpsKeepAliveAgent,\n} from 'agentkeepalive';\nimport bs58 from 'bs58';\nimport {Buffer} from 'buffer';\n// @ts-ignore\nimport fastStableStringify from 'fast-stable-stringify';\nimport type {Agent as NodeHttpAgent} from 'http';\nimport {Agent as NodeHttpsAgent} from 'https';\nimport {\n type as pick,\n number,\n string,\n array,\n boolean,\n literal,\n record,\n union,\n optional,\n nullable,\n coerce,\n instance,\n create,\n tuple,\n unknown,\n any,\n} from 'superstruct';\nimport type {Struct} from 'superstruct';\nimport RpcClient from 'jayson/lib/client/browser';\nimport {JSONRPCError} from 'jayson';\n\nimport {EpochSchedule} from './epoch-schedule';\nimport {SendTransactionError, SolanaJSONRPCError} from './errors';\nimport fetchImpl from './fetch-impl';\nimport {DurableNonce, NonceAccount} from './nonce-account';\nimport {PublicKey} from './publickey';\nimport {Signer} from './keypair';\nimport RpcWebSocketClient from './rpc-websocket';\nimport {MS_PER_SLOT} from './timing';\nimport {\n Transaction,\n TransactionStatus,\n TransactionVersion,\n VersionedTransaction,\n} from './transaction';\nimport {Message, MessageHeader, MessageV0, VersionedMessage} from './message';\nimport {AddressLookupTableAccount} from './programs/address-lookup-table/state';\nimport assert from './utils/assert';\nimport {sleep} from './utils/sleep';\nimport {toBuffer} from './utils/to-buffer';\nimport {\n TransactionExpiredBlockheightExceededError,\n TransactionExpiredNonceInvalidError,\n TransactionExpiredTimeoutError,\n} from './transaction/expiry-custom-errors';\nimport {makeWebsocketUrl} from './utils/makeWebsocketUrl';\nimport type {Blockhash} from './blockhash';\nimport type {FeeCalculator} from './fee-calculator';\nimport type {TransactionSignature} from './transaction';\nimport type {CompiledInstruction} from './message';\n\nconst PublicKeyFromString = coerce(\n instance(PublicKey),\n string(),\n value => new PublicKey(value),\n);\n\nconst RawAccountDataResult = tuple([string(), literal('base64')]);\n\nconst BufferFromRawAccountData = coerce(\n instance(Buffer),\n RawAccountDataResult,\n value => Buffer.from(value[0], 'base64'),\n);\n\n/**\n * Attempt to use a recent blockhash for up to 30 seconds\n * @internal\n */\nexport const BLOCKHASH_CACHE_TIMEOUT_MS = 30 * 1000;\n\n/**\n * HACK.\n * Copied from rpc-websockets/dist/lib/client.\n * Otherwise, `yarn build` fails with:\n * https://gist.github.com/steveluscher/c057eca81d479ef705cdb53162f9971d\n */\ninterface IWSRequestParams {\n [x: string]: any;\n [x: number]: any;\n}\n\ntype ClientSubscriptionId = number;\n/** @internal */ type ServerSubscriptionId = number;\n/** @internal */ type SubscriptionConfigHash = string;\n/** @internal */ type SubscriptionDisposeFn = () => Promise;\n/** @internal */ type SubscriptionStateChangeCallback = (\n nextState: StatefulSubscription['state'],\n) => void;\n/** @internal */ type SubscriptionStateChangeDisposeFn = () => void;\n/**\n * @internal\n * Every subscription contains the args used to open the subscription with\n * the server, and a list of callers interested in notifications.\n */\ntype BaseSubscription = Readonly<{\n args: IWSRequestParams;\n callbacks: Set['callback']>;\n}>;\n/**\n * @internal\n * A subscription may be in various states of connectedness. Only when it is\n * fully connected will it have a server subscription id associated with it.\n * This id can be returned to the server to unsubscribe the client entirely.\n */\ntype StatefulSubscription = Readonly<\n // New subscriptions that have not yet been\n // sent to the server start in this state.\n | {\n state: 'pending';\n }\n // These subscriptions have been sent to the server\n // and are waiting for the server to acknowledge them.\n | {\n state: 'subscribing';\n }\n // These subscriptions have been acknowledged by the\n // server and have been assigned server subscription ids.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'subscribed';\n }\n // These subscriptions are intended to be torn down and\n // are waiting on an acknowledgement from the server.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribing';\n }\n // The request to tear down these subscriptions has been\n // acknowledged by the server. The `serverSubscriptionId`\n // is the id of the now-dead subscription.\n | {\n serverSubscriptionId: ServerSubscriptionId;\n state: 'unsubscribed';\n }\n>;\n/**\n * A type that encapsulates a subscription's RPC method\n * names and notification (callback) signature.\n */\ntype SubscriptionConfig = Readonly<\n | {\n callback: AccountChangeCallback;\n method: 'accountSubscribe';\n unsubscribeMethod: 'accountUnsubscribe';\n }\n | {\n callback: LogsCallback;\n method: 'logsSubscribe';\n unsubscribeMethod: 'logsUnsubscribe';\n }\n | {\n callback: ProgramAccountChangeCallback;\n method: 'programSubscribe';\n unsubscribeMethod: 'programUnsubscribe';\n }\n | {\n callback: RootChangeCallback;\n method: 'rootSubscribe';\n unsubscribeMethod: 'rootUnsubscribe';\n }\n | {\n callback: SignatureSubscriptionCallback;\n method: 'signatureSubscribe';\n unsubscribeMethod: 'signatureUnsubscribe';\n }\n | {\n callback: SlotChangeCallback;\n method: 'slotSubscribe';\n unsubscribeMethod: 'slotUnsubscribe';\n }\n | {\n callback: SlotUpdateCallback;\n method: 'slotsUpdatesSubscribe';\n unsubscribeMethod: 'slotsUpdatesUnsubscribe';\n }\n>;\n/**\n * @internal\n * Utility type that keeps tagged unions intact while omitting properties.\n */\ntype DistributiveOmit = T extends unknown\n ? Omit\n : never;\n/**\n * @internal\n * This type represents a single subscribable 'topic.' It's made up of:\n *\n * - The args used to open the subscription with the server,\n * - The state of the subscription, in terms of its connectedness, and\n * - The set of callbacks to call when the server publishes notifications\n *\n * This record gets indexed by `SubscriptionConfigHash` and is used to\n * set up subscriptions, fan out notifications, and track subscription state.\n */\ntype Subscription = BaseSubscription &\n StatefulSubscription &\n DistributiveOmit;\n\ntype RpcRequest = (methodName: string, args: Array) => Promise;\n\ntype RpcBatchRequest = (requests: RpcParams[]) => Promise;\n\n/**\n * @internal\n */\nexport type RpcParams = {\n methodName: string;\n args: Array;\n};\n\nexport type TokenAccountsFilter =\n | {\n mint: PublicKey;\n }\n | {\n programId: PublicKey;\n };\n\n/**\n * Extra contextual information for RPC responses\n */\nexport type Context = {\n slot: number;\n};\n\n/**\n * Options for sending transactions\n */\nexport type SendOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for confirming transactions\n */\nexport type ConfirmOptions = {\n /** disable transaction verification step */\n skipPreflight?: boolean;\n /** desired commitment level */\n commitment?: Commitment;\n /** preflight commitment level */\n preflightCommitment?: Commitment;\n /** Maximum number of times for the RPC node to retry sending the transaction to the leader. */\n maxRetries?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Options for getConfirmedSignaturesForAddress2\n */\nexport type ConfirmedSignaturesForAddress2Options = {\n /**\n * Start searching backwards from this transaction signature.\n * @remarks If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n};\n\n/**\n * Options for getSignaturesForAddress\n */\nexport type SignaturesForAddressOptions = {\n /**\n * Start searching backwards from this transaction signature.\n * @remarks If not provided the search starts from the highest max confirmed block.\n */\n before?: TransactionSignature;\n /** Search until this transaction signature is reached, if found before `limit`. */\n until?: TransactionSignature;\n /** Maximum transaction signatures to return (between 1 and 1,000, default: 1,000). */\n limit?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * RPC Response with extra contextual information\n */\nexport type RpcResponseAndContext = {\n /** response context */\n context: Context;\n /** response value */\n value: T;\n};\n\nexport type BlockhashWithExpiryBlockHeight = Readonly<{\n blockhash: Blockhash;\n lastValidBlockHeight: number;\n}>;\n\n/**\n * A strategy for confirming transactions that uses the last valid\n * block height for a given blockhash to check for transaction expiration.\n */\nexport type BlockheightBasedTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & BlockhashWithExpiryBlockHeight;\n\n/**\n * A strategy for confirming durable nonce transactions.\n */\nexport type DurableNonceTransactionConfirmationStrategy =\n BaseTransactionConfirmationStrategy & {\n /**\n * The lowest slot at which to fetch the nonce value from the\n * nonce account. This should be no lower than the slot at\n * which the last-known value of the nonce was fetched.\n */\n minContextSlot: number;\n /**\n * The account where the current value of the nonce is stored.\n */\n nonceAccountPubkey: PublicKey;\n /**\n * The nonce value that was used to sign the transaction\n * for which confirmation is being sought.\n */\n nonceValue: DurableNonce;\n };\n\n/**\n * Properties shared by all transaction confirmation strategies\n */\nexport type BaseTransactionConfirmationStrategy = Readonly<{\n /** A signal that, when aborted, cancels any outstanding transaction confirmation operations */\n abortSignal?: AbortSignal;\n signature: TransactionSignature;\n}>;\n\n/**\n * This type represents all transaction confirmation strategies\n */\nexport type TransactionConfirmationStrategy =\n | BlockheightBasedTransactionConfirmationStrategy\n | DurableNonceTransactionConfirmationStrategy;\n\n/* @internal */\nfunction assertEndpointUrl(putativeUrl: string) {\n if (/^https?:/.test(putativeUrl) === false) {\n throw new TypeError('Endpoint URL must start with `http:` or `https:`.');\n }\n return putativeUrl;\n}\n\n/** @internal */\nfunction extractCommitmentFromConfig(\n commitmentOrConfig?: Commitment | ({commitment?: Commitment} & TConfig),\n) {\n let commitment: Commitment | undefined;\n let config: Omit | undefined;\n if (typeof commitmentOrConfig === 'string') {\n commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n const {commitment: specifiedCommitment, ...specifiedConfig} =\n commitmentOrConfig;\n commitment = specifiedCommitment;\n config = specifiedConfig;\n }\n return {commitment, config};\n}\n\n/**\n * @internal\n */\nfunction applyDefaultMemcmpEncodingToFilters(\n filters: GetProgramAccountsFilter[],\n): GetProgramAccountsFilter[] {\n return filters.map(filter =>\n 'memcmp' in filter\n ? {\n ...filter,\n memcmp: {\n ...filter.memcmp,\n encoding: filter.memcmp.encoding ?? 'base58',\n },\n }\n : filter,\n );\n}\n\n/**\n * @internal\n */\nfunction createRpcResult(result: Struct) {\n return union([\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n result,\n }),\n pick({\n jsonrpc: literal('2.0'),\n id: string(),\n error: pick({\n code: unknown(),\n message: string(),\n data: optional(any()),\n }),\n }),\n ]);\n}\n\nconst UnknownRpcResult = createRpcResult(unknown());\n\n/**\n * @internal\n */\nfunction jsonRpcResult(schema: Struct) {\n return coerce(createRpcResult(schema), UnknownRpcResult, value => {\n if ('error' in value) {\n return value;\n } else {\n return {\n ...value,\n result: create(value.result, schema),\n };\n }\n });\n}\n\n/**\n * @internal\n */\nfunction jsonRpcResultAndContext(value: Struct) {\n return jsonRpcResult(\n pick({\n context: pick({\n slot: number(),\n }),\n value,\n }),\n );\n}\n\n/**\n * @internal\n */\nfunction notificationResultAndContext(value: Struct) {\n return pick({\n context: pick({\n slot: number(),\n }),\n value,\n });\n}\n\n/**\n * @internal\n */\nfunction versionedMessageFromResponse(\n version: TransactionVersion | undefined,\n response: MessageResponse,\n): VersionedMessage {\n if (version === 0) {\n return new MessageV0({\n header: response.header,\n staticAccountKeys: response.accountKeys.map(\n accountKey => new PublicKey(accountKey),\n ),\n recentBlockhash: response.recentBlockhash,\n compiledInstructions: response.instructions.map(ix => ({\n programIdIndex: ix.programIdIndex,\n accountKeyIndexes: ix.accounts,\n data: bs58.decode(ix.data),\n })),\n addressTableLookups: response.addressTableLookups!,\n });\n } else {\n return new Message(response);\n }\n}\n\n/**\n * The level of commitment desired when querying state\n *
\n *   'processed': Query the most recent block which has reached 1 confirmation by the connected node\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Commitment =\n | 'processed'\n | 'confirmed'\n | 'finalized'\n | 'recent' // Deprecated as of v1.5.5\n | 'single' // Deprecated as of v1.5.5\n | 'singleGossip' // Deprecated as of v1.5.5\n | 'root' // Deprecated as of v1.5.5\n | 'max'; // Deprecated as of v1.5.5\n\n/**\n * A subset of Commitment levels, which are at least optimistically confirmed\n *
\n *   'confirmed': Query the most recent block which has reached 1 confirmation by the cluster\n *   'finalized': Query the most recent block which has been finalized by the cluster\n * 
\n */\nexport type Finality = 'confirmed' | 'finalized';\n\n/**\n * Filter for largest accounts query\n *
\n *   'circulating':    Return the largest accounts that are part of the circulating supply\n *   'nonCirculating': Return the largest accounts that are not part of the circulating supply\n * 
\n */\nexport type LargestAccountsFilter = 'circulating' | 'nonCirculating';\n\n/**\n * Configuration object for changing `getAccountInfo` query behavior\n */\nexport type GetAccountInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for changing `getBalance` query behavior\n */\nexport type GetBalanceConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getBlock` query behavior\n */\nexport type GetVersionedBlockConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n /**\n * Whether to populate the rewards array. If parameter not provided, the default includes rewards.\n */\n rewards?: boolean;\n /**\n * Level of transaction detail to return, either \"full\", \"accounts\", \"signatures\", or \"none\". If\n * parameter not provided, the default detail level is \"full\". If \"accounts\" are requested,\n * transaction details only include signatures and an annotated list of accounts in each\n * transaction. Transaction metadata is limited to only: fee, err, pre_balances, post_balances,\n * pre_token_balances, and post_token_balances.\n */\n transactionDetails?: 'accounts' | 'full' | 'none' | 'signatures';\n};\n\n/**\n * Configuration object for changing `getStakeMinimumDelegation` query behavior\n */\nexport type GetStakeMinimumDelegationConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n};\n\n/**\n * Configuration object for changing `getBlockHeight` query behavior\n */\nexport type GetBlockHeightConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getEpochInfo` query behavior\n */\nexport type GetEpochInfoConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getInflationReward` query behavior\n */\nexport type GetInflationRewardConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** An epoch for which the reward occurs. If omitted, the previous epoch will be used */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getLatestBlockhash` query behavior\n */\nexport type GetLatestBlockhashConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `isBlockhashValid` query behavior\n */\nexport type IsBlockhashValidConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlot` query behavior\n */\nexport type GetSlotConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getSlotLeader` query behavior\n */\nexport type GetSlotLeaderConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n};\n\n/**\n * Configuration object for changing `getTransaction` query behavior\n */\nexport type GetVersionedTransactionConfig = {\n /** The level of finality desired */\n commitment?: Finality;\n /** The max transaction version to return in responses. If the requested transaction is a higher version, an error will be returned */\n maxSupportedTransactionVersion?: number;\n};\n\n/**\n * Configuration object for changing `getLargestAccounts` query behavior\n */\nexport type GetLargestAccountsConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Filter largest accounts by whether they are part of the circulating supply */\n filter?: LargestAccountsFilter;\n};\n\n/**\n * Configuration object for changing `getSupply` request behavior\n */\nexport type GetSupplyConfig = {\n /** The level of commitment desired */\n commitment?: Commitment;\n /** Exclude non circulating accounts list from response */\n excludeNonCirculatingAccountsList?: boolean;\n};\n\n/**\n * Configuration object for changing query behavior\n */\nexport type SignatureStatusConfig = {\n /** enable searching status history, not needed for recent transactions */\n searchTransactionHistory: boolean;\n};\n\n/**\n * Information describing a cluster node\n */\nexport type ContactInfo = {\n /** Identity public key of the node */\n pubkey: string;\n /** Gossip network address for the node */\n gossip: string | null;\n /** TPU network address for the node (null if not available) */\n tpu: string | null;\n /** JSON RPC network address for the node (null if not available) */\n rpc: string | null;\n /** Software version of the node (null if not available) */\n version: string | null;\n};\n\n/**\n * Information describing a vote account\n */\nexport type VoteAccountInfo = {\n /** Public key of the vote account */\n votePubkey: string;\n /** Identity public key of the node voting with this account */\n nodePubkey: string;\n /** The stake, in lamports, delegated to this vote account and activated */\n activatedStake: number;\n /** Whether the vote account is staked for this epoch */\n epochVoteAccount: boolean;\n /** Recent epoch voting credit history for this voter */\n epochCredits: Array<[number, number, number]>;\n /** A percentage (0-100) of rewards payout owed to the voter */\n commission: number;\n /** Most recent slot voted on by this vote account */\n lastVote: number;\n};\n\n/**\n * A collection of cluster vote accounts\n */\nexport type VoteAccountStatus = {\n /** Active vote accounts */\n current: Array;\n /** Inactive vote accounts */\n delinquent: Array;\n};\n\n/**\n * Network Inflation\n * (see https://docs.solana.com/implemented-proposals/ed_overview)\n */\nexport type InflationGovernor = {\n foundation: number;\n foundationTerm: number;\n initial: number;\n taper: number;\n terminal: number;\n};\n\nconst GetInflationGovernorResult = pick({\n foundation: number(),\n foundationTerm: number(),\n initial: number(),\n taper: number(),\n terminal: number(),\n});\n\n/**\n * The inflation reward for an epoch\n */\nexport type InflationReward = {\n /** epoch for which the reward occurs */\n epoch: number;\n /** the slot in which the rewards are effective */\n effectiveSlot: number;\n /** reward amount in lamports */\n amount: number;\n /** post balance of the account in lamports */\n postBalance: number;\n /** vote account commission when the reward was credited */\n commission?: number | null;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationReward\" message\n */\nconst GetInflationRewardResult = jsonRpcResult(\n array(\n nullable(\n pick({\n epoch: number(),\n effectiveSlot: number(),\n amount: number(),\n postBalance: number(),\n commission: optional(nullable(number())),\n }),\n ),\n ),\n);\n\nexport type RecentPrioritizationFees = {\n /** slot in which the fee was observed */\n slot: number;\n /** the per-compute-unit fee paid by at least one successfully landed transaction, specified in increments of 0.000001 lamports*/\n prioritizationFee: number;\n};\n\n/**\n * Configuration object for changing `getRecentPrioritizationFees` query behavior\n */\nexport type GetRecentPrioritizationFeesConfig = {\n /**\n * If this parameter is provided, the response will reflect a fee to land a transaction locking\n * all of the provided accounts as writable.\n */\n lockedWritableAccounts?: PublicKey[];\n};\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesResult = array(\n pick({\n slot: number(),\n prioritizationFee: number(),\n }),\n);\n\nexport type InflationRate = {\n /** total inflation */\n total: number;\n /** inflation allocated to validators */\n validator: number;\n /** inflation allocated to the foundation */\n foundation: number;\n /** epoch for which these values are valid */\n epoch: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateResult = pick({\n total: number(),\n validator: number(),\n foundation: number(),\n epoch: number(),\n});\n\n/**\n * Information about the current epoch\n */\nexport type EpochInfo = {\n epoch: number;\n slotIndex: number;\n slotsInEpoch: number;\n absoluteSlot: number;\n blockHeight?: number;\n transactionCount?: number;\n};\n\nconst GetEpochInfoResult = pick({\n epoch: number(),\n slotIndex: number(),\n slotsInEpoch: number(),\n absoluteSlot: number(),\n blockHeight: optional(number()),\n transactionCount: optional(number()),\n});\n\nconst GetEpochScheduleResult = pick({\n slotsPerEpoch: number(),\n leaderScheduleSlotOffset: number(),\n warmup: boolean(),\n firstNormalEpoch: number(),\n firstNormalSlot: number(),\n});\n\n/**\n * Leader schedule\n * (see https://docs.solana.com/terminology#leader-schedule)\n */\nexport type LeaderSchedule = {\n [address: string]: number[];\n};\n\nconst GetLeaderScheduleResult = record(string(), array(number()));\n\n/**\n * Transaction error or null\n */\nconst TransactionErrorResult = nullable(union([pick({}), string()]));\n\n/**\n * Signature status for a transaction\n */\nconst SignatureStatusResult = pick({\n err: TransactionErrorResult,\n});\n\n/**\n * Transaction signature received notification\n */\nconst SignatureReceivedResult = literal('receivedSignature');\n\n/**\n * Version info for a node\n */\nexport type Version = {\n /** Version of solana-core */\n 'solana-core': string;\n 'feature-set'?: number;\n};\n\nconst VersionResult = pick({\n 'solana-core': string(),\n 'feature-set': optional(number()),\n});\n\nexport type SimulatedTransactionAccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: string;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: string[];\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\nexport type TransactionReturnDataEncoding = 'base64';\n\nexport type TransactionReturnData = {\n programId: string;\n data: [string, TransactionReturnDataEncoding];\n};\n\nexport type SimulateTransactionConfig = {\n /** Optional parameter used to enable signature verification before simulation */\n sigVerify?: boolean;\n /** Optional parameter used to replace the simulated transaction's recent blockhash with the latest blockhash */\n replaceRecentBlockhash?: boolean;\n /** Optional parameter used to set the commitment level when selecting the latest block */\n commitment?: Commitment;\n /** Optional parameter used to specify a list of base58-encoded account addresses to return post simulation state for */\n accounts?: {\n /** The encoding of the returned account's data */\n encoding: 'base64';\n addresses: string[];\n };\n /** Optional parameter used to specify the minimum block slot that can be used for simulation */\n minContextSlot?: number;\n /** Optional parameter used to include inner instructions in the simulation */\n innerInstructions?: boolean;\n};\n\nexport type SimulatedTransactionResponse = {\n err: TransactionError | string | null;\n logs: Array | null;\n accounts?: (SimulatedTransactionAccountInfo | null)[] | null;\n unitsConsumed?: number;\n returnData?: TransactionReturnData | null;\n innerInstructions?: ParsedInnerInstruction[] | null;\n};\nconst ParsedInstructionStruct = pick({\n program: string(),\n programId: PublicKeyFromString,\n parsed: unknown(),\n});\n\nconst PartiallyDecodedInstructionStruct = pick({\n programId: PublicKeyFromString,\n accounts: array(PublicKeyFromString),\n data: string(),\n});\n\nconst SimulatedTransactionResponseStruct = jsonRpcResultAndContext(\n pick({\n err: nullable(union([pick({}), string()])),\n logs: nullable(array(string())),\n accounts: optional(\n nullable(\n array(\n nullable(\n pick({\n executable: boolean(),\n owner: string(),\n lamports: number(),\n data: array(string()),\n rentEpoch: optional(number()),\n }),\n ),\n ),\n ),\n ),\n unitsConsumed: optional(number()),\n returnData: optional(\n nullable(\n pick({\n programId: string(),\n data: tuple([string(), literal('base64')]),\n }),\n ),\n ),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n union([\n ParsedInstructionStruct,\n PartiallyDecodedInstructionStruct,\n ]),\n ),\n }),\n ),\n ),\n ),\n }),\n);\n\nexport type ParsedInnerInstruction = {\n index: number;\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n};\n\nexport type TokenBalance = {\n accountIndex: number;\n mint: string;\n owner?: string;\n programId?: string;\n uiTokenAmount: TokenAmount;\n};\n\n/**\n * Metadata for a parsed confirmed transaction on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionMeta} instead.\n */\nexport type ParsedConfirmedTransactionMeta = ParsedTransactionMeta;\n\n/**\n * Collection of addresses loaded by a transaction using address table lookups\n */\nexport type LoadedAddresses = {\n writable: Array;\n readonly: Array;\n};\n\n/**\n * Metadata for a parsed transaction on the ledger\n */\nexport type ParsedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked parsed instructions */\n innerInstructions?: ParsedInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n /** The cost units consumed after processing the transaction */\n costUnits?: number;\n};\n\nexport type CompiledInnerInstruction = {\n index: number;\n instructions: CompiledInstruction[];\n};\n\n/**\n * Metadata for a confirmed transaction on the ledger\n */\nexport type ConfirmedTransactionMeta = {\n /** The fee charged for processing the transaction */\n fee: number;\n /** An array of cross program invoked instructions */\n innerInstructions?: CompiledInnerInstruction[] | null;\n /** The balances of the transaction accounts before processing */\n preBalances: Array;\n /** The balances of the transaction accounts after processing */\n postBalances: Array;\n /** An array of program log messages emitted during a transaction */\n logMessages?: Array | null;\n /** The token balances of the transaction accounts before processing */\n preTokenBalances?: Array | null;\n /** The token balances of the transaction accounts after processing */\n postTokenBalances?: Array | null;\n /** The error result of transaction processing */\n err: TransactionError | null;\n /** The collection of addresses loaded using address lookup tables */\n loadedAddresses?: LoadedAddresses;\n /** The compute units consumed after processing the transaction */\n computeUnitsConsumed?: number;\n /** The cost units consumed after processing the transaction */\n costUnits?: number;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type TransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A processed transaction from the RPC API\n */\nexport type VersionedTransactionResponse = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The transaction version */\n version?: TransactionVersion;\n};\n\n/**\n * A processed transaction message from the RPC API\n */\ntype MessageResponse = {\n accountKeys: string[];\n header: MessageHeader;\n instructions: CompiledInstruction[];\n recentBlockhash: string;\n addressTableLookups?: ParsedAddressTableLookup[];\n};\n\n/**\n * A confirmed transaction on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0.\n */\nexport type ConfirmedTransaction = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: Transaction;\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n};\n\n/**\n * A partially decoded transaction instruction\n */\nexport type PartiallyDecodedInstruction = {\n /** Program id called by this instruction */\n programId: PublicKey;\n /** Public keys of accounts passed to this instruction */\n accounts: Array;\n /** Raw base-58 instruction data */\n data: string;\n};\n\n/**\n * A parsed transaction message account\n */\nexport type ParsedMessageAccount = {\n /** Public key of the account */\n pubkey: PublicKey;\n /** Indicates if the account signed the transaction */\n signer: boolean;\n /** Indicates if the account is writable for this transaction */\n writable: boolean;\n /** Indicates if the account key came from the transaction or a lookup table */\n source?: 'transaction' | 'lookupTable';\n};\n\n/**\n * A parsed transaction instruction\n */\nexport type ParsedInstruction = {\n /** Name of the program for this instruction */\n program: string;\n /** ID of the program for this instruction */\n programId: PublicKey;\n /** Parsed instruction info */\n parsed: any;\n};\n\n/**\n * A parsed address table lookup\n */\nexport type ParsedAddressTableLookup = {\n /** Address lookup table account key */\n accountKey: PublicKey;\n /** Parsed instruction info */\n writableIndexes: number[];\n /** Parsed instruction info */\n readonlyIndexes: number[];\n};\n\n/**\n * A parsed transaction message\n */\nexport type ParsedMessage = {\n /** Accounts used in the instructions */\n accountKeys: ParsedMessageAccount[];\n /** The atomically executed instructions for the transaction */\n instructions: (ParsedInstruction | PartiallyDecodedInstruction)[];\n /** Recent blockhash */\n recentBlockhash: string;\n /** Address table lookups used to load additional accounts */\n addressTableLookups?: ParsedAddressTableLookup[] | null;\n};\n\n/**\n * A parsed transaction\n */\nexport type ParsedTransaction = {\n /** Signatures for the transaction */\n signatures: Array;\n /** Message of the transaction */\n message: ParsedMessage;\n};\n\n/**\n * A parsed and confirmed transaction on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link ParsedTransactionWithMeta} instead.\n */\nexport type ParsedConfirmedTransaction = ParsedTransactionWithMeta;\n\n/**\n * A parsed transaction on the ledger with meta\n */\nexport type ParsedTransactionWithMeta = {\n /** The slot during which the transaction was processed */\n slot: number;\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** The version of the transaction message */\n version?: TransactionVersion;\n};\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type BlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: Message;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type AccountsModeBlockResponse = VersionedAccountsModeBlockResponse;\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type NoneModeBlockResponse = VersionedNoneModeBlockResponse;\n\n/**\n * A block with parsed transactions\n */\nexport type ParsedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The details of the transaction */\n transaction: ParsedTransaction;\n /** Metadata produced from the transaction */\n meta: ParsedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n /** The number of blocks beneath this block */\n blockHeight: number | null;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `accounts`\n */\nexport type ParsedAccountsModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n ParsedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A block with parsed transactions where the `transactionDetails` mode is `none`\n */\nexport type ParsedNoneModeBlockResponse = Omit<\n ParsedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A processed block fetched from the RPC API\n */\nexport type VersionedBlockResponse = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions with status meta and original message */\n transactions: Array<{\n /** The transaction */\n transaction: {\n /** The transaction message */\n message: VersionedMessage;\n /** The transaction signatures */\n signatures: string[];\n };\n /** Metadata produced from the transaction */\n meta: ConfirmedTransactionMeta | null;\n /** The transaction version */\n version?: TransactionVersion;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n /** Public key of reward recipient */\n pubkey: string;\n /** Reward value in lamports */\n lamports: number;\n /** Account balance after reward is applied */\n postBalance: number | null;\n /** Type of reward received */\n rewardType: string | null;\n /** Vote account commission when the reward was credited, only present for voting and staking rewards */\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `accounts`\n */\nexport type VersionedAccountsModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n> & {\n transactions: Array<\n Omit & {\n transaction: Pick<\n VersionedBlockResponse['transactions'][number]['transaction'],\n 'signatures'\n > & {\n accountKeys: ParsedMessageAccount[];\n };\n }\n >;\n};\n\n/**\n * A processed block fetched from the RPC API where the `transactionDetails` mode is `none`\n */\nexport type VersionedNoneModeBlockResponse = Omit<\n VersionedBlockResponse,\n 'transactions'\n>;\n\n/**\n * A confirmed block on the ledger\n *\n * @deprecated Deprecated since RPC v1.8.0.\n */\nexport type ConfirmedBlock = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of transactions and status metas */\n transactions: Array<{\n transaction: Transaction;\n meta: ConfirmedTransactionMeta | null;\n }>;\n /** Vector of block rewards */\n rewards?: Array<{\n pubkey: string;\n lamports: number;\n postBalance: number | null;\n rewardType: string | null;\n commission?: number | null;\n }>;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * A Block on the ledger with signatures only\n */\nexport type BlockSignatures = {\n /** Blockhash of this block */\n blockhash: Blockhash;\n /** Blockhash of this block's parent */\n previousBlockhash: Blockhash;\n /** Slot index of this block's parent */\n parentSlot: number;\n /** Vector of signatures */\n signatures: Array;\n /** The unix timestamp of when the block was processed */\n blockTime: number | null;\n};\n\n/**\n * recent block production information\n */\nexport type BlockProduction = Readonly<{\n /** a dictionary of validator identities, as base-58 encoded strings. Value is a two element array containing the number of leader slots and the number of blocks produced */\n byIdentity: Readonly>>;\n /** Block production slot range */\n range: Readonly<{\n /** first slot of the block production information (inclusive) */\n firstSlot: number;\n /** last slot of block production information (inclusive) */\n lastSlot: number;\n }>;\n}>;\n\nexport type GetBlockProductionConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Slot range to return block production for. If parameter not provided, defaults to current epoch. */\n range?: {\n /** first slot to return block production information for (inclusive) */\n firstSlot: number;\n /** last slot to return block production information for (inclusive). If parameter not provided, defaults to the highest slot */\n lastSlot?: number;\n };\n /** Only return results for this validator identity (base-58 encoded) */\n identity?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getBlockProduction\" message\n */\nconst BlockProductionResponseStruct = jsonRpcResultAndContext(\n pick({\n byIdentity: record(string(), array(number())),\n range: pick({\n firstSlot: number(),\n lastSlot: number(),\n }),\n }),\n);\n\n/**\n * A performance sample\n */\nexport type PerfSample = {\n /** Slot number of sample */\n slot: number;\n /** Number of transactions in a sample window */\n numTransactions: number;\n /** Number of slots in a sample window */\n numSlots: number;\n /** Sample window in seconds */\n samplePeriodSecs: number;\n};\n\nfunction createRpcClient(\n url: string,\n httpHeaders?: HttpHeaders,\n customFetch?: FetchFn,\n fetchMiddleware?: FetchMiddleware,\n disableRetryOnRateLimit?: boolean,\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false,\n): RpcClient {\n const fetch = customFetch ? customFetch : fetchImpl;\n let agent: NodeHttpAgent | NodeHttpsAgent | undefined;\n if (process.env.BROWSER) {\n if (httpAgent != null) {\n console.warn(\n 'You have supplied an `httpAgent` when creating a `Connection` in a browser environment.' +\n 'It has been ignored; `httpAgent` is only used in Node environments.',\n );\n }\n } else {\n if (httpAgent == null) {\n if (process.env.NODE_ENV !== 'test') {\n const agentOptions = {\n // One second fewer than the Solana RPC's keepalive timeout.\n // Read more: https://github.com/solana-labs/solana/issues/27859#issuecomment-1340097889\n freeSocketTimeout: 19000,\n keepAlive: true,\n maxSockets: 25,\n };\n if (url.startsWith('https:')) {\n agent = new HttpsKeepAliveAgent(agentOptions);\n } else {\n agent = new HttpKeepAliveAgent(agentOptions);\n }\n }\n } else {\n if (httpAgent !== false) {\n const isHttps = url.startsWith('https:');\n if (isHttps && !(httpAgent instanceof NodeHttpsAgent)) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `https.Agent`. You have, instead, supplied an ' +\n '`http.Agent` through `httpAgent`.',\n );\n } else if (!isHttps && httpAgent instanceof NodeHttpsAgent) {\n throw new Error(\n 'The endpoint `' +\n url +\n '` can only be paired with an `http.Agent`. You have, instead, supplied an ' +\n '`https.Agent` through `httpAgent`.',\n );\n }\n agent = httpAgent;\n }\n }\n }\n\n let fetchWithMiddleware: FetchFn | undefined;\n\n if (fetchMiddleware) {\n fetchWithMiddleware = async (info, init) => {\n const modifiedFetchArgs = await new Promise>(\n (resolve, reject) => {\n try {\n fetchMiddleware(info, init, (modifiedInfo, modifiedInit) =>\n resolve([modifiedInfo, modifiedInit]),\n );\n } catch (error) {\n reject(error);\n }\n },\n );\n return await fetch(...modifiedFetchArgs);\n };\n }\n\n const clientBrowser = new RpcClient(async (request, callback) => {\n const options = {\n method: 'POST',\n body: request,\n agent,\n headers: Object.assign(\n {\n 'Content-Type': 'application/json',\n },\n httpHeaders || {},\n COMMON_HTTP_HEADERS,\n ),\n };\n\n try {\n let too_many_requests_retries = 5;\n let res: Response;\n let waitTime = 500;\n for (;;) {\n if (fetchWithMiddleware) {\n res = await fetchWithMiddleware(url, options);\n } else {\n res = await fetch(url, options);\n }\n\n if (res.status !== 429 /* Too many requests */) {\n break;\n }\n if (disableRetryOnRateLimit === true) {\n break;\n }\n too_many_requests_retries -= 1;\n if (too_many_requests_retries === 0) {\n break;\n }\n console.error(\n `Server responded with ${res.status} ${res.statusText}. Retrying after ${waitTime}ms delay...`,\n );\n await sleep(waitTime);\n waitTime *= 2;\n }\n\n const text = await res.text();\n if (res.ok) {\n callback(null, text);\n } else {\n callback(new Error(`${res.status} ${res.statusText}: ${text}`));\n }\n } catch (err) {\n if (err instanceof Error) callback(err);\n }\n }, {});\n\n return clientBrowser;\n}\n\nfunction createRpcRequest(client: RpcClient): RpcRequest {\n return (method, args) => {\n return new Promise((resolve, reject) => {\n client.request(method, args, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\nfunction createRpcBatchRequest(client: RpcClient): RpcBatchRequest {\n return (requests: RpcParams[]) => {\n return new Promise((resolve, reject) => {\n // Do nothing if requests is empty\n if (requests.length === 0) resolve([]);\n\n const batch = requests.map((params: RpcParams) => {\n return client.request(params.methodName, params.args);\n });\n\n client.request(batch, (err: any, response: any) => {\n if (err) {\n reject(err);\n return;\n }\n resolve(response);\n });\n });\n };\n}\n\n/**\n * Expected JSON RPC response for the \"getInflationGovernor\" message\n */\nconst GetInflationGovernorRpcResult = jsonRpcResult(GetInflationGovernorResult);\n\n/**\n * Expected JSON RPC response for the \"getInflationRate\" message\n */\nconst GetInflationRateRpcResult = jsonRpcResult(GetInflationRateResult);\n\n/**\n * Expected JSON RPC response for the \"getRecentPrioritizationFees\" message\n */\nconst GetRecentPrioritizationFeesRpcResult = jsonRpcResult(\n GetRecentPrioritizationFeesResult,\n);\n\n/**\n * Expected JSON RPC response for the \"getEpochInfo\" message\n */\nconst GetEpochInfoRpcResult = jsonRpcResult(GetEpochInfoResult);\n\n/**\n * Expected JSON RPC response for the \"getEpochSchedule\" message\n */\nconst GetEpochScheduleRpcResult = jsonRpcResult(GetEpochScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"getLeaderSchedule\" message\n */\nconst GetLeaderScheduleRpcResult = jsonRpcResult(GetLeaderScheduleResult);\n\n/**\n * Expected JSON RPC response for the \"minimumLedgerSlot\" and \"getFirstAvailableBlock\" messages\n */\nconst SlotRpcResult = jsonRpcResult(number());\n\n/**\n * Supply\n */\nexport type Supply = {\n /** Total supply in lamports */\n total: number;\n /** Circulating supply in lamports */\n circulating: number;\n /** Non-circulating supply in lamports */\n nonCirculating: number;\n /** List of non-circulating account addresses */\n nonCirculatingAccounts: Array;\n};\n\n/**\n * Expected JSON RPC response for the \"getSupply\" message\n */\nconst GetSupplyRpcResult = jsonRpcResultAndContext(\n pick({\n total: number(),\n circulating: number(),\n nonCirculating: number(),\n nonCirculatingAccounts: array(PublicKeyFromString),\n }),\n);\n\n/**\n * Token amount object which returns a token amount in different formats\n * for various client use cases.\n */\nexport type TokenAmount = {\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC structure for token amounts\n */\nconst TokenAmountResult = pick({\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n});\n\n/**\n * Token address and balance.\n */\nexport type TokenAccountBalancePair = {\n /** Address of the token account */\n address: PublicKey;\n /** Raw amount of tokens as string ignoring decimals */\n amount: string;\n /** Number of decimals configured for token's mint */\n decimals: number;\n /** Token amount as float, accounts for decimals */\n uiAmount: number | null;\n /** Token amount as string, accounts for decimals */\n uiAmountString?: string;\n};\n\n/**\n * Expected JSON RPC response for the \"getTokenLargestAccounts\" message\n */\nconst GetTokenLargestAccountsResult = jsonRpcResultAndContext(\n array(\n pick({\n address: PublicKeyFromString,\n amount: string(),\n uiAmount: nullable(number()),\n decimals: number(),\n uiAmountString: optional(string()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message\n */\nconst GetTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\nconst ParsedAccountDataResult = pick({\n program: string(),\n parsed: unknown(),\n space: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getTokenAccountsByOwner\" message with parsed data\n */\nconst GetParsedTokenAccountsByOwner = jsonRpcResultAndContext(\n array(\n pick({\n pubkey: PublicKeyFromString,\n account: pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedAccountDataResult,\n rentEpoch: number(),\n }),\n }),\n ),\n);\n\n/**\n * Pair of an account address and its balance\n */\nexport type AccountBalancePair = {\n address: PublicKey;\n lamports: number;\n};\n\n/**\n * Expected JSON RPC response for the \"getLargestAccounts\" message\n */\nconst GetLargestAccountsRpcResult = jsonRpcResultAndContext(\n array(\n pick({\n lamports: number(),\n address: PublicKeyFromString,\n }),\n ),\n);\n\n/**\n * @internal\n */\nconst AccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: BufferFromRawAccountData,\n rentEpoch: number(),\n});\n\n/**\n * @internal\n */\nconst KeyedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\nconst ParsedOrRawAccountData = coerce(\n union([instance(Buffer), ParsedAccountDataResult]),\n union([RawAccountDataResult, ParsedAccountDataResult]),\n value => {\n if (Array.isArray(value)) {\n return create(value, BufferFromRawAccountData);\n } else {\n return value;\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedAccountInfoResult = pick({\n executable: boolean(),\n owner: PublicKeyFromString,\n lamports: number(),\n data: ParsedOrRawAccountData,\n rentEpoch: number(),\n});\n\nconst KeyedParsedAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: ParsedAccountInfoResult,\n});\n\n/**\n * @internal\n */\nconst StakeActivationResult = pick({\n state: union([\n literal('active'),\n literal('inactive'),\n literal('activating'),\n literal('deactivating'),\n ]),\n active: number(),\n inactive: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"getConfirmedSignaturesForAddress2\" message\n */\n\nconst GetConfirmedSignaturesForAddress2RpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getSignaturesForAddress\" message\n */\nconst GetSignaturesForAddressRpcResult = jsonRpcResult(\n array(\n pick({\n signature: string(),\n slot: number(),\n err: TransactionErrorResult,\n memo: nullable(string()),\n blockTime: optional(nullable(number())),\n }),\n ),\n);\n\n/***\n * Expected JSON RPC response for the \"accountNotification\" message\n */\nconst AccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(AccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst ProgramAccountInfoResult = pick({\n pubkey: PublicKeyFromString,\n account: AccountInfoResult,\n});\n\n/***\n * Expected JSON RPC response for the \"programNotification\" message\n */\nconst ProgramAccountNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(ProgramAccountInfoResult),\n});\n\n/**\n * @internal\n */\nconst SlotInfoResult = pick({\n parent: number(),\n slot: number(),\n root: number(),\n});\n\n/**\n * Expected JSON RPC response for the \"slotNotification\" message\n */\nconst SlotNotificationResult = pick({\n subscription: number(),\n result: SlotInfoResult,\n});\n\n/**\n * Slot updates which can be used for tracking the live progress of a cluster.\n * - `\"firstShredReceived\"`: connected node received the first shred of a block.\n * Indicates that a new block that is being produced.\n * - `\"completed\"`: connected node has received all shreds of a block. Indicates\n * a block was recently produced.\n * - `\"optimisticConfirmation\"`: block was optimistically confirmed by the\n * cluster. It is not guaranteed that an optimistic confirmation notification\n * will be sent for every finalized blocks.\n * - `\"root\"`: the connected node rooted this block.\n * - `\"createdBank\"`: the connected node has started validating this block.\n * - `\"frozen\"`: the connected node has validated this block.\n * - `\"dead\"`: the connected node failed to validate this block.\n */\nexport type SlotUpdate =\n | {\n type: 'firstShredReceived';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'completed';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'createdBank';\n slot: number;\n timestamp: number;\n parent: number;\n }\n | {\n type: 'frozen';\n slot: number;\n timestamp: number;\n stats: {\n numTransactionEntries: number;\n numSuccessfulTransactions: number;\n numFailedTransactions: number;\n maxTransactionsPerEntry: number;\n };\n }\n | {\n type: 'dead';\n slot: number;\n timestamp: number;\n err: string;\n }\n | {\n type: 'optimisticConfirmation';\n slot: number;\n timestamp: number;\n }\n | {\n type: 'root';\n slot: number;\n timestamp: number;\n };\n\n/**\n * @internal\n */\nconst SlotUpdateResult = union([\n pick({\n type: union([\n literal('firstShredReceived'),\n literal('completed'),\n literal('optimisticConfirmation'),\n literal('root'),\n ]),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('createdBank'),\n parent: number(),\n slot: number(),\n timestamp: number(),\n }),\n pick({\n type: literal('frozen'),\n slot: number(),\n timestamp: number(),\n stats: pick({\n numTransactionEntries: number(),\n numSuccessfulTransactions: number(),\n numFailedTransactions: number(),\n maxTransactionsPerEntry: number(),\n }),\n }),\n pick({\n type: literal('dead'),\n slot: number(),\n timestamp: number(),\n err: string(),\n }),\n]);\n\n/**\n * Expected JSON RPC response for the \"slotsUpdatesNotification\" message\n */\nconst SlotUpdateNotificationResult = pick({\n subscription: number(),\n result: SlotUpdateResult,\n});\n\n/**\n * Expected JSON RPC response for the \"signatureNotification\" message\n */\nconst SignatureNotificationResult = pick({\n subscription: number(),\n result: notificationResultAndContext(\n union([SignatureStatusResult, SignatureReceivedResult]),\n ),\n});\n\n/**\n * Expected JSON RPC response for the \"rootNotification\" message\n */\nconst RootNotificationResult = pick({\n subscription: number(),\n result: number(),\n});\n\nconst ContactInfoResult = pick({\n pubkey: string(),\n gossip: nullable(string()),\n tpu: nullable(string()),\n rpc: nullable(string()),\n version: nullable(string()),\n});\n\nconst VoteAccountInfoResult = pick({\n votePubkey: string(),\n nodePubkey: string(),\n activatedStake: number(),\n epochVoteAccount: boolean(),\n epochCredits: array(tuple([number(), number(), number()])),\n commission: number(),\n lastVote: number(),\n rootSlot: nullable(number()),\n});\n\n/**\n * Expected JSON RPC response for the \"getVoteAccounts\" message\n */\nconst GetVoteAccounts = jsonRpcResult(\n pick({\n current: array(VoteAccountInfoResult),\n delinquent: array(VoteAccountInfoResult),\n }),\n);\n\nconst ConfirmationStatus = union([\n literal('processed'),\n literal('confirmed'),\n literal('finalized'),\n]);\n\nconst SignatureStatusResponse = pick({\n slot: number(),\n confirmations: nullable(number()),\n err: TransactionErrorResult,\n confirmationStatus: optional(ConfirmationStatus),\n});\n\n/**\n * Expected JSON RPC response for the \"getSignatureStatuses\" message\n */\nconst GetSignatureStatusesRpcResult = jsonRpcResultAndContext(\n array(nullable(SignatureStatusResponse)),\n);\n\n/**\n * Expected JSON RPC response for the \"getMinimumBalanceForRentExemption\" message\n */\nconst GetMinimumBalanceForRentExemptionRpcResult = jsonRpcResult(number());\n\nconst AddressTableLookupStruct = pick({\n accountKey: PublicKeyFromString,\n writableIndexes: array(number()),\n readonlyIndexes: array(number()),\n});\n\nconst ConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(string()),\n header: pick({\n numRequiredSignatures: number(),\n numReadonlySignedAccounts: number(),\n numReadonlyUnsignedAccounts: number(),\n }),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n recentBlockhash: string(),\n addressTableLookups: optional(array(AddressTableLookupStruct)),\n }),\n});\n\nconst AnnotatedAccountKey = pick({\n pubkey: PublicKeyFromString,\n signer: boolean(),\n writable: boolean(),\n source: optional(union([literal('transaction'), literal('lookupTable')])),\n});\n\nconst ConfirmedTransactionAccountsModeResult = pick({\n accountKeys: array(AnnotatedAccountKey),\n signatures: array(string()),\n});\n\nconst ParsedInstructionResult = pick({\n parsed: unknown(),\n program: string(),\n programId: PublicKeyFromString,\n});\n\nconst RawInstructionResult = pick({\n accounts: array(PublicKeyFromString),\n data: string(),\n programId: PublicKeyFromString,\n});\n\nconst InstructionResult = union([\n RawInstructionResult,\n ParsedInstructionResult,\n]);\n\nconst UnknownInstructionResult = union([\n pick({\n parsed: unknown(),\n program: string(),\n programId: string(),\n }),\n pick({\n accounts: array(string()),\n data: string(),\n programId: string(),\n }),\n]);\n\nconst ParsedOrRawInstruction = coerce(\n InstructionResult,\n UnknownInstructionResult,\n value => {\n if ('accounts' in value) {\n return create(value, RawInstructionResult);\n } else {\n return create(value, ParsedInstructionResult);\n }\n },\n);\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionResult = pick({\n signatures: array(string()),\n message: pick({\n accountKeys: array(AnnotatedAccountKey),\n instructions: array(ParsedOrRawInstruction),\n recentBlockhash: string(),\n addressTableLookups: optional(nullable(array(AddressTableLookupStruct))),\n }),\n});\n\nconst TokenBalanceResult = pick({\n accountIndex: number(),\n mint: string(),\n owner: optional(string()),\n programId: optional(string()),\n uiTokenAmount: TokenAmountResult,\n});\n\nconst LoadedAddressesResult = pick({\n writable: array(PublicKeyFromString),\n readonly: array(PublicKeyFromString),\n});\n\n/**\n * @internal\n */\nconst ConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(\n pick({\n accounts: array(number()),\n data: string(),\n programIdIndex: number(),\n }),\n ),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n costUnits: optional(number()),\n});\n\n/**\n * @internal\n */\nconst ParsedConfirmedTransactionMetaResult = pick({\n err: TransactionErrorResult,\n fee: number(),\n innerInstructions: optional(\n nullable(\n array(\n pick({\n index: number(),\n instructions: array(ParsedOrRawInstruction),\n }),\n ),\n ),\n ),\n preBalances: array(number()),\n postBalances: array(number()),\n logMessages: optional(nullable(array(string()))),\n preTokenBalances: optional(nullable(array(TokenBalanceResult))),\n postTokenBalances: optional(nullable(array(TokenBalanceResult))),\n loadedAddresses: optional(LoadedAddressesResult),\n computeUnitsConsumed: optional(number()),\n costUnits: optional(number()),\n});\n\nconst TransactionVersionStruct = union([literal(0), literal('legacy')]);\n\n/** @internal */\nconst RewardsResult = pick({\n pubkey: string(),\n lamports: number(),\n postBalance: nullable(number()),\n rewardType: nullable(string()),\n commission: optional(nullable(number())),\n});\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message\n */\nconst GetParsedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `accounts`\n */\nconst GetParsedAccountsModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionAccountsModeResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n version: optional(TransactionVersionStruct),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getBlock\" message when `transactionDetails` is `none`\n */\nconst GetParsedNoneModeBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n blockHeight: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getConfirmedBlock\" message\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link GetBlockRpcResult} instead.\n */\nconst GetConfirmedBlockRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n transactions: array(\n pick({\n transaction: ConfirmedTransactionResult,\n meta: nullable(ConfirmedTransactionMetaResult),\n }),\n ),\n rewards: optional(array(RewardsResult)),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getBlock\" message\n */\nconst GetBlockSignaturesRpcResult = jsonRpcResult(\n nullable(\n pick({\n blockhash: string(),\n previousBlockhash: string(),\n parentSlot: number(),\n signatures: array(string()),\n blockTime: nullable(number()),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getTransaction\" message\n */\nconst GetTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n meta: nullable(ConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n transaction: ConfirmedTransactionResult,\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected parsed JSON RPC response for the \"getTransaction\" message\n */\nconst GetParsedTransactionRpcResult = jsonRpcResult(\n nullable(\n pick({\n slot: number(),\n transaction: ParsedConfirmedTransactionResult,\n meta: nullable(ParsedConfirmedTransactionMetaResult),\n blockTime: optional(nullable(number())),\n version: optional(TransactionVersionStruct),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"getLatestBlockhash\" message\n */\nconst GetLatestBlockhashRpcResult = jsonRpcResultAndContext(\n pick({\n blockhash: string(),\n lastValidBlockHeight: number(),\n }),\n);\n\n/**\n * Expected JSON RPC response for the \"isBlockhashValid\" message\n */\nconst IsBlockhashValidRpcResult = jsonRpcResultAndContext(boolean());\n\nconst PerfSampleResult = pick({\n slot: number(),\n numTransactions: number(),\n numSlots: number(),\n samplePeriodSecs: number(),\n});\n\n/*\n * Expected JSON RPC response for \"getRecentPerformanceSamples\" message\n */\nconst GetRecentPerformanceSamplesRpcResult = jsonRpcResult(\n array(PerfSampleResult),\n);\n\n/**\n * Expected JSON RPC response for the \"getFeeCalculatorForBlockhash\" message\n */\nconst GetFeeCalculatorRpcResult = jsonRpcResultAndContext(\n nullable(\n pick({\n feeCalculator: pick({\n lamportsPerSignature: number(),\n }),\n }),\n ),\n);\n\n/**\n * Expected JSON RPC response for the \"requestAirdrop\" message\n */\nconst RequestAirdropRpcResult = jsonRpcResult(string());\n\n/**\n * Expected JSON RPC response for the \"sendTransaction\" message\n */\nconst SendTransactionRpcResult = jsonRpcResult(string());\n\n/**\n * Information about the latest slot being processed by a node\n */\nexport type SlotInfo = {\n /** Currently processing slot */\n slot: number;\n /** Parent of the current slot */\n parent: number;\n /** The root block of the current slot's fork */\n root: number;\n};\n\n/**\n * Parsed account data\n */\nexport type ParsedAccountData = {\n /** Name of the program that owns this account */\n program: string;\n /** Parsed account data */\n parsed: any;\n /** Space used by account data */\n space: number;\n};\n\n/**\n * Stake Activation data\n */\nexport type StakeActivationData = {\n /** the stake account's activation state */\n state: 'active' | 'inactive' | 'activating' | 'deactivating';\n /** stake active during the epoch */\n active: number;\n /** stake inactive during the epoch */\n inactive: number;\n};\n\n/**\n * Data slice argument for getProgramAccounts\n */\nexport type DataSlice = {\n /** offset of data slice */\n offset: number;\n /** length of data slice */\n length: number;\n};\n\n/**\n * Memory comparison filter for getProgramAccounts\n */\nexport type MemcmpFilter = {\n memcmp: {\n /** offset into program account data to start comparison */\n offset: number;\n } & (\n | {\n encoding?: 'base58'; // Base-58 is the default when not supplied.\n /** data to match, as base-58 encoded string and limited to less than 129 bytes */\n bytes: string;\n }\n | {\n encoding: 'base64';\n /** data to match, as base-64 encoded string */\n bytes: string;\n }\n );\n};\n\n/**\n * Data size comparison filter for getProgramAccounts\n */\nexport type DataSizeFilter = {\n /** Size of data for program account data length comparison */\n dataSize: number;\n};\n\n/**\n * A filter object for getProgramAccounts\n */\nexport type GetProgramAccountsFilter = MemcmpFilter | DataSizeFilter;\n\n/**\n * Configuration object for getProgramAccounts requests\n */\nexport type GetProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional encoding for account data (default base64)\n * To use \"jsonParsed\" encoding, please refer to `getParsedProgramAccounts` in connection.ts\n * */\n encoding?: 'base64';\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** wrap the result in an RpcResponse JSON object */\n withContext?: boolean;\n};\n\nexport type GetProgramAccountsResponse = readonly Readonly<{\n account: AccountInfo;\n /** the account Pubkey as base-58 encoded string */\n pubkey: PublicKey;\n}>[];\n\n/**\n * Configuration object for getParsedProgramAccounts\n */\nexport type GetParsedProgramAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional array of filters to apply to accounts */\n filters?: GetProgramAccountsFilter[];\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for getMultipleAccounts\n */\nexport type GetMultipleAccountsConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n /** Optional data slice to limit the returned account data */\n dataSlice?: DataSlice;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetStakeActivationConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** Epoch for which to calculate activation details. If parameter not provided, defaults to current epoch */\n epoch?: number;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTokenAccountsByOwnerConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getStakeActivation`\n */\nexport type GetTransactionCountConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonce`\n */\nexport type GetNonceConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\n/**\n * Configuration object for `getNonceAndContext`\n */\nexport type GetNonceAndContextConfig = {\n /** Optional commitment level */\n commitment?: Commitment;\n /** The minimum slot that the request can be evaluated at */\n minContextSlot?: number;\n};\n\nexport type AccountSubscriptionConfig = Readonly<{\n /** Optional commitment level */\n commitment?: Commitment;\n /**\n * Encoding format for Account data\n * - `base58` is slow.\n * - `jsonParsed` encoding attempts to use program-specific state parsers to return more\n * human-readable and explicit account state data\n * - If `jsonParsed` is requested but a parser cannot be found, the field falls back to `base64`\n * encoding, detectable when the `data` field is type `string`.\n */\n encoding?: 'base58' | 'base64' | 'base64+zstd' | 'jsonParsed';\n}>;\n\nexport type ProgramAccountSubscriptionConfig = Readonly<{\n /** Optional commitment level */\n commitment?: Commitment;\n /**\n * Encoding format for Account data\n * - `base58` is slow.\n * - `jsonParsed` encoding attempts to use program-specific state parsers to return more\n * human-readable and explicit account state data\n * - If `jsonParsed` is requested but a parser cannot be found, the field falls back to `base64`\n * encoding, detectable when the `data` field is type `string`.\n */\n encoding?: 'base58' | 'base64' | 'base64+zstd' | 'jsonParsed';\n /**\n * Filter results using various filter objects\n * The resultant account must meet ALL filter criteria to be included in the returned results\n */\n filters?: GetProgramAccountsFilter[];\n}>;\n\n/**\n * Information describing an account\n */\nexport type AccountInfo = {\n /** `true` if this account's data contains a loaded program */\n executable: boolean;\n /** Identifier of the program that owns the account */\n owner: PublicKey;\n /** Number of lamports assigned to the account */\n lamports: number;\n /** Optional data assigned to the account */\n data: T;\n /** Optional rent epoch info for account */\n rentEpoch?: number;\n};\n\n/**\n * Account information identified by pubkey\n */\nexport type KeyedAccountInfo = {\n accountId: PublicKey;\n accountInfo: AccountInfo;\n};\n\n/**\n * Callback function for account change notifications\n */\nexport type AccountChangeCallback = (\n accountInfo: AccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for program account change notifications\n */\nexport type ProgramAccountChangeCallback = (\n keyedAccountInfo: KeyedAccountInfo,\n context: Context,\n) => void;\n\n/**\n * Callback function for slot change notifications\n */\nexport type SlotChangeCallback = (slotInfo: SlotInfo) => void;\n\n/**\n * Callback function for slot update notifications\n */\nexport type SlotUpdateCallback = (slotUpdate: SlotUpdate) => void;\n\n/**\n * Callback function for signature status notifications\n */\nexport type SignatureResultCallback = (\n signatureResult: SignatureResult,\n context: Context,\n) => void;\n\n/**\n * Signature status notification with transaction result\n */\nexport type SignatureStatusNotification = {\n type: 'status';\n result: SignatureResult;\n};\n\n/**\n * Signature received notification\n */\nexport type SignatureReceivedNotification = {\n type: 'received';\n};\n\n/**\n * Callback function for signature notifications\n */\nexport type SignatureSubscriptionCallback = (\n notification: SignatureStatusNotification | SignatureReceivedNotification,\n context: Context,\n) => void;\n\n/**\n * Signature subscription options\n */\nexport type SignatureSubscriptionOptions = {\n commitment?: Commitment;\n enableReceivedNotification?: boolean;\n};\n\n/**\n * Callback function for root change notifications\n */\nexport type RootChangeCallback = (root: number) => void;\n\n/**\n * @internal\n */\nconst LogsResult = pick({\n err: TransactionErrorResult,\n logs: array(string()),\n signature: string(),\n});\n\n/**\n * Logs result.\n */\nexport type Logs = {\n err: TransactionError | null;\n logs: string[];\n signature: string;\n};\n\n/**\n * Expected JSON RPC response for the \"logsNotification\" message.\n */\nconst LogsNotificationResult = pick({\n result: notificationResultAndContext(LogsResult),\n subscription: number(),\n});\n\n/**\n * Filter for log subscriptions.\n */\nexport type LogsFilter = PublicKey | 'all' | 'allWithVotes';\n\n/**\n * Callback function for log notifications.\n */\nexport type LogsCallback = (logs: Logs, ctx: Context) => void;\n\n/**\n * Signature result\n */\nexport type SignatureResult = {\n err: TransactionError | null;\n};\n\n/**\n * Transaction error\n */\nexport type TransactionError = {} | string;\n\n/**\n * Transaction confirmation status\n *
\n *   'processed': Transaction landed in a block which has reached 1 confirmation by the connected node\n *   'confirmed': Transaction landed in a block which has reached 1 confirmation by the cluster\n *   'finalized': Transaction landed in a block which has been finalized by the cluster\n * 
\n */\nexport type TransactionConfirmationStatus =\n | 'processed'\n | 'confirmed'\n | 'finalized';\n\n/**\n * Signature status\n */\nexport type SignatureStatus = {\n /** when the transaction was processed */\n slot: number;\n /** the number of blocks that have been confirmed and voted on in the fork containing `slot` */\n confirmations: number | null;\n /** transaction error, if any */\n err: TransactionError | null;\n /** cluster confirmation status, if data available. Possible responses: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * A confirmed signature with its status\n */\nexport type ConfirmedSignatureInfo = {\n /** the transaction signature */\n signature: string;\n /** when the transaction was processed */\n slot: number;\n /** error, if any */\n err: TransactionError | null;\n /** memo associated with the transaction, if any */\n memo: string | null;\n /** The unix timestamp of when the transaction was processed */\n blockTime?: number | null;\n /** Cluster confirmation status, if available. Possible values: `processed`, `confirmed`, `finalized` */\n confirmationStatus?: TransactionConfirmationStatus;\n};\n\n/**\n * An object defining headers to be passed to the RPC server\n */\nexport type HttpHeaders = {\n [header: string]: string;\n} & {\n // Prohibited headers; for internal use only.\n 'solana-client'?: never;\n};\n\n/**\n * The type of the JavaScript `fetch()` API\n */\nexport type FetchFn = typeof fetchImpl;\n\n/**\n * A callback used to augment the outgoing HTTP request\n */\nexport type FetchMiddleware = (\n info: Parameters[0],\n init: Parameters[1],\n fetch: (...a: Parameters) => void,\n) => void;\n\n/**\n * Configuration for instantiating a Connection\n */\nexport type ConnectionConfig = {\n /**\n * An `http.Agent` that will be used to manage socket connections (eg. to implement connection\n * persistence). Set this to `false` to create a connection that uses no agent. This applies to\n * Node environments only.\n */\n httpAgent?: NodeHttpAgent | NodeHttpsAgent | false;\n /** Optional commitment level */\n commitment?: Commitment;\n /** Optional endpoint URL to the fullnode JSON RPC PubSub WebSocket Endpoint */\n wsEndpoint?: string;\n /** Optional HTTP headers object */\n httpHeaders?: HttpHeaders;\n /** Optional custom fetch function */\n fetch?: FetchFn;\n /** Optional fetch middleware callback */\n fetchMiddleware?: FetchMiddleware;\n /** Optional Disable retrying calls when server responds with HTTP 429 (Too Many Requests) */\n disableRetryOnRateLimit?: boolean;\n /** time to allow for the server to initially process a transaction (in milliseconds) */\n confirmTransactionInitialTimeout?: number;\n};\n\n/** @internal */\nconst COMMON_HTTP_HEADERS = {\n 'solana-client': `js/${process.env.npm_package_version ?? 'UNKNOWN'}`,\n};\n\n/**\n * A connection to a fullnode JSON RPC endpoint\n */\nexport class Connection {\n /** @internal */ _commitment?: Commitment;\n /** @internal */ _confirmTransactionInitialTimeout?: number;\n /** @internal */ _rpcEndpoint: string;\n /** @internal */ _rpcWsEndpoint: string;\n /** @internal */ _rpcClient: RpcClient;\n /** @internal */ _rpcRequest: RpcRequest;\n /** @internal */ _rpcBatchRequest: RpcBatchRequest;\n /** @internal */ _rpcWebSocket: RpcWebSocketClient;\n /** @internal */ _rpcWebSocketConnected: boolean = false;\n /** @internal */ _rpcWebSocketHeartbeat: ReturnType<\n typeof setInterval\n > | null = null;\n /** @internal */ _rpcWebSocketIdleTimeout: ReturnType<\n typeof setTimeout\n > | null = null;\n /** @internal\n * A number that we increment every time an active connection closes.\n * Used to determine whether the same socket connection that was open\n * when an async operation started is the same one that's active when\n * its continuation fires.\n *\n */ private _rpcWebSocketGeneration: number = 0;\n\n /** @internal */ _disableBlockhashCaching: boolean = false;\n /** @internal */ _pollingBlockhash: boolean = false;\n /** @internal */ _blockhashInfo: {\n latestBlockhash: BlockhashWithExpiryBlockHeight | null;\n lastFetch: number;\n simulatedSignatures: Array;\n transactionSignatures: Array;\n } = {\n latestBlockhash: null,\n lastFetch: 0,\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n\n /** @internal */ private _nextClientSubscriptionId: ClientSubscriptionId = 0;\n /** @internal */ private _subscriptionDisposeFunctionsByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionDisposeFn\n | undefined;\n } = {};\n /** @internal */ private _subscriptionHashByClientSubscriptionId: {\n [clientSubscriptionId: ClientSubscriptionId]:\n | SubscriptionConfigHash\n | undefined;\n } = {};\n /** @internal */ private _subscriptionStateChangeCallbacksByHash: {\n [hash: SubscriptionConfigHash]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionCallbacksByServerSubscriptionId: {\n [serverSubscriptionId: ServerSubscriptionId]:\n | Set\n | undefined;\n } = {};\n /** @internal */ private _subscriptionsByHash: {\n [hash: SubscriptionConfigHash]: Subscription | undefined;\n } = {};\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n /** @internal */ private _subscriptionsAutoDisposedByRpc: Set =\n new Set();\n\n /**\n * Establish a JSON RPC connection\n *\n * @param endpoint URL to the fullnode JSON RPC endpoint\n * @param commitmentOrConfig optional default commitment level or optional ConnectionConfig configuration object\n */\n constructor(\n endpoint: string,\n commitmentOrConfig?: Commitment | ConnectionConfig,\n ) {\n let wsEndpoint;\n let httpHeaders;\n let fetch;\n let fetchMiddleware;\n let disableRetryOnRateLimit;\n let httpAgent;\n if (commitmentOrConfig && typeof commitmentOrConfig === 'string') {\n this._commitment = commitmentOrConfig;\n } else if (commitmentOrConfig) {\n this._commitment = commitmentOrConfig.commitment;\n this._confirmTransactionInitialTimeout =\n commitmentOrConfig.confirmTransactionInitialTimeout;\n wsEndpoint = commitmentOrConfig.wsEndpoint;\n httpHeaders = commitmentOrConfig.httpHeaders;\n fetch = commitmentOrConfig.fetch;\n fetchMiddleware = commitmentOrConfig.fetchMiddleware;\n disableRetryOnRateLimit = commitmentOrConfig.disableRetryOnRateLimit;\n httpAgent = commitmentOrConfig.httpAgent;\n }\n\n this._rpcEndpoint = assertEndpointUrl(endpoint);\n this._rpcWsEndpoint = wsEndpoint || makeWebsocketUrl(endpoint);\n\n this._rpcClient = createRpcClient(\n endpoint,\n httpHeaders,\n fetch,\n fetchMiddleware,\n disableRetryOnRateLimit,\n httpAgent,\n );\n this._rpcRequest = createRpcRequest(this._rpcClient);\n this._rpcBatchRequest = createRpcBatchRequest(this._rpcClient);\n\n this._rpcWebSocket = new RpcWebSocketClient(this._rpcWsEndpoint, {\n autoconnect: false,\n max_reconnects: Infinity,\n });\n this._rpcWebSocket.on('open', this._wsOnOpen.bind(this));\n this._rpcWebSocket.on('error', this._wsOnError.bind(this));\n this._rpcWebSocket.on('close', this._wsOnClose.bind(this));\n this._rpcWebSocket.on(\n 'accountNotification',\n this._wsOnAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'programNotification',\n this._wsOnProgramAccountNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotNotification',\n this._wsOnSlotNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'slotsUpdatesNotification',\n this._wsOnSlotUpdatesNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'signatureNotification',\n this._wsOnSignatureNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'rootNotification',\n this._wsOnRootNotification.bind(this),\n );\n this._rpcWebSocket.on(\n 'logsNotification',\n this._wsOnLogsNotification.bind(this),\n );\n }\n\n /**\n * The default commitment used for requests\n */\n get commitment(): Commitment | undefined {\n return this._commitment;\n }\n\n /**\n * The RPC endpoint\n */\n get rpcEndpoint(): string {\n return this._rpcEndpoint;\n }\n\n /**\n * Fetch the balance for the specified public key, return with context\n */\n async getBalanceAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise> {\n /** @internal */\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get balance for ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the balance for the specified public key\n */\n async getBalance(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetBalanceConfig,\n ): Promise {\n return await this.getBalanceAndContext(publicKey, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get balance of account ' + publicKey.toBase58() + ': ' + e,\n );\n });\n }\n\n /**\n * Fetch the estimated production time of a block\n */\n async getBlockTime(slot: number): Promise {\n const unsafeRes = await this._rpcRequest('getBlockTime', [slot]);\n const res = create(unsafeRes, jsonRpcResult(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get block time for slot ${slot}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the lowest slot that the node has information about in its ledger.\n * This value may increase over time if the node is configured to purge older ledger data\n */\n async getMinimumLedgerSlot(): Promise {\n const unsafeRes = await this._rpcRequest('minimumLedgerSlot', []);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get minimum ledger slot',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the slot of the lowest confirmed block that has not been purged from the ledger\n */\n async getFirstAvailableBlock(): Promise {\n const unsafeRes = await this._rpcRequest('getFirstAvailableBlock', []);\n const res = create(unsafeRes, SlotRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get first available block',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch information about the current supply\n */\n async getSupply(\n config?: GetSupplyConfig | Commitment,\n ): Promise> {\n let configArg: GetSupplyConfig = {};\n if (typeof config === 'string') {\n configArg = {commitment: config};\n } else if (config) {\n configArg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n } else {\n configArg = {\n commitment: this.commitment,\n };\n }\n\n const unsafeRes = await this._rpcRequest('getSupply', [configArg]);\n const res = create(unsafeRes, GetSupplyRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current supply of a token mint\n */\n async getTokenSupply(\n tokenMintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenMintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenSupply', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get token supply');\n }\n return res.result;\n }\n\n /**\n * Fetch the current balance of a token account\n */\n async getTokenAccountBalance(\n tokenAddress: PublicKey,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([tokenAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenAccountBalance', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(TokenAmountResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token account balance',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the token accounts owned by the specified account\n *\n * @return {Promise}\n */\n async getTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitmentOrConfig?: Commitment | GetTokenAccountsByOwnerConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed token accounts owned by the specified account\n *\n * @return {Promise}>>>}\n */\n async getParsedTokenAccountsByOwner(\n ownerAddress: PublicKey,\n filter: TokenAccountsFilter,\n commitment?: Commitment,\n ): Promise<\n RpcResponseAndContext<\n Array<{pubkey: PublicKey; account: AccountInfo}>\n >\n > {\n let _args: any[] = [ownerAddress.toBase58()];\n if ('mint' in filter) {\n _args.push({mint: filter.mint.toBase58()});\n } else {\n _args.push({programId: filter.programId.toBase58()});\n }\n\n const args = this._buildArgs(_args, commitment, 'jsonParsed');\n const unsafeRes = await this._rpcRequest('getTokenAccountsByOwner', args);\n const res = create(unsafeRes, GetParsedTokenAccountsByOwner);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get token accounts owned by account ${ownerAddress.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest accounts with their current balances\n */\n async getLargestAccounts(\n config?: GetLargestAccountsConfig,\n ): Promise>> {\n const arg = {\n ...config,\n commitment: (config && config.commitment) || this.commitment,\n };\n const args = arg.filter || arg.commitment ? [arg] : [];\n const unsafeRes = await this._rpcRequest('getLargestAccounts', args);\n const res = create(unsafeRes, GetLargestAccountsRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get largest accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the 20 largest token accounts with their current balances\n * for a given mint.\n */\n async getTokenLargestAccounts(\n mintAddress: PublicKey,\n commitment?: Commitment,\n ): Promise>> {\n const args = this._buildArgs([mintAddress.toBase58()], commitment);\n const unsafeRes = await this._rpcRequest('getTokenLargestAccounts', args);\n const res = create(unsafeRes, GetTokenLargestAccountsResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get token largest accounts',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key, return with context\n */\n async getAccountInfoAndContext(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'base64',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(AccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed account info for the specified public key\n */\n async getParsedAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise<\n RpcResponseAndContext | null>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getAccountInfo', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(nullable(ParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info about account ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for the specified public key\n */\n async getAccountInfo(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetAccountInfoConfig,\n ): Promise | null> {\n try {\n const res = await this.getAccountInfoAndContext(\n publicKey,\n commitmentOrConfig,\n );\n return res.value;\n } catch (e) {\n throw new Error(\n 'failed to get info about account ' + publicKey.toBase58() + ': ' + e,\n );\n }\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleParsedAccounts(\n publicKeys: PublicKey[],\n rawConfig?: GetMultipleAccountsConfig,\n ): Promise<\n RpcResponseAndContext<(AccountInfo | null)[]>\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'jsonParsed', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(ParsedAccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys, return with context\n */\n async getMultipleAccountsInfoAndContext(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise | null)[]>> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const keys = publicKeys.map(key => key.toBase58());\n const args = this._buildArgs([keys], commitment, 'base64', config);\n const unsafeRes = await this._rpcRequest('getMultipleAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResultAndContext(array(nullable(AccountInfoResult))),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get info for accounts ${keys}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the account info for multiple accounts specified by an array of public keys\n */\n async getMultipleAccountsInfo(\n publicKeys: PublicKey[],\n commitmentOrConfig?: Commitment | GetMultipleAccountsConfig,\n ): Promise<(AccountInfo | null)[]> {\n const res = await this.getMultipleAccountsInfoAndContext(\n publicKeys,\n commitmentOrConfig,\n );\n return res.value;\n }\n\n /**\n * Returns epoch activation information for a stake account that has been delegated\n *\n * @deprecated Deprecated since RPC v1.18; will be removed in a future version.\n */\n async getStakeActivation(\n publicKey: PublicKey,\n commitmentOrConfig?: Commitment | GetStakeActivationConfig,\n epoch?: number,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n\n const unsafeRes = await this._rpcRequest('getStakeActivation', args);\n const res = create(unsafeRes, jsonRpcResult(StakeActivationResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get Stake Activation ${publicKey.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment: GetProgramAccountsConfig &\n Readonly<{withContext: true}>,\n ): Promise>;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetProgramAccountsConfig | Commitment,\n ): Promise<\n | GetProgramAccountsResponse\n | RpcResponseAndContext\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const {encoding, ...configWithoutEncoding} = config || {};\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n encoding || 'base64',\n {\n ...configWithoutEncoding,\n ...(configWithoutEncoding.filters\n ? {\n filters: applyDefaultMemcmpEncodingToFilters(\n configWithoutEncoding.filters,\n ),\n }\n : null),\n },\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const baseSchema = array(KeyedAccountInfoResult);\n const res =\n configWithoutEncoding.withContext === true\n ? create(unsafeRes, jsonRpcResultAndContext(baseSchema))\n : create(unsafeRes, jsonRpcResult(baseSchema));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n /**\n * Fetch and parse all the accounts owned by the specified program id\n *\n * @return {Promise}>>}\n */\n async getParsedProgramAccounts(\n programId: PublicKey,\n configOrCommitment?: GetParsedProgramAccountsConfig | Commitment,\n ): Promise<\n Array<{\n pubkey: PublicKey;\n account: AccountInfo;\n }>\n > {\n const {commitment, config} =\n extractCommitmentFromConfig(configOrCommitment);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getProgramAccounts', args);\n const res = create(\n unsafeRes,\n jsonRpcResult(array(KeyedParsedAccountInfoResult)),\n );\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get accounts owned by program ${programId.toBase58()}`,\n );\n }\n return res.result;\n }\n\n confirmTransaction(\n strategy: TransactionConfirmationStrategy,\n commitment?: Commitment,\n ): Promise>;\n\n /** @deprecated Instead, call `confirmTransaction` and pass in {@link TransactionConfirmationStrategy} */\n // eslint-disable-next-line no-dupe-class-members\n confirmTransaction(\n strategy: TransactionSignature,\n commitment?: Commitment,\n ): Promise>;\n\n // eslint-disable-next-line no-dupe-class-members\n async confirmTransaction(\n strategy: TransactionConfirmationStrategy | TransactionSignature,\n commitment?: Commitment,\n ): Promise> {\n let rawSignature: string;\n\n if (typeof strategy == 'string') {\n rawSignature = strategy;\n } else {\n const config = strategy as TransactionConfirmationStrategy;\n\n if (config.abortSignal?.aborted) {\n return Promise.reject(config.abortSignal.reason);\n }\n rawSignature = config.signature;\n }\n\n let decodedSignature;\n\n try {\n decodedSignature = bs58.decode(rawSignature);\n } catch (err) {\n throw new Error('signature must be base58 encoded: ' + rawSignature);\n }\n\n assert(decodedSignature.length === 64, 'signature has invalid length');\n\n if (typeof strategy === 'string') {\n return await this.confirmTransactionUsingLegacyTimeoutStrategy({\n commitment: commitment || this.commitment,\n signature: rawSignature,\n });\n } else if ('lastValidBlockHeight' in strategy) {\n return await this.confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n } else {\n return await this.confirmTransactionUsingDurableNonceStrategy({\n commitment: commitment || this.commitment,\n strategy,\n });\n }\n }\n\n private getCancellationPromise(signal?: AbortSignal): Promise {\n return new Promise((_, reject) => {\n if (signal == null) {\n return;\n }\n if (signal.aborted) {\n reject(signal.reason);\n } else {\n signal.addEventListener('abort', () => {\n reject(signal.reason);\n });\n }\n });\n }\n\n private getTransactionConfirmationPromise({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }): {\n abortConfirmation(): void;\n confirmationPromise: Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>;\n } {\n let signatureSubscriptionId: number | undefined;\n let disposeSignatureSubscriptionStateChangeObserver:\n | SubscriptionStateChangeDisposeFn\n | undefined;\n let done = false;\n const confirmationPromise = new Promise<{\n __type: TransactionStatus.PROCESSED;\n response: RpcResponseAndContext;\n }>((resolve, reject) => {\n try {\n signatureSubscriptionId = this.onSignature(\n signature,\n (result: SignatureResult, context: Context) => {\n signatureSubscriptionId = undefined;\n const response = {\n context,\n value: result,\n };\n resolve({__type: TransactionStatus.PROCESSED, response});\n },\n commitment,\n );\n const subscriptionSetupPromise = new Promise(\n resolveSubscriptionSetup => {\n if (signatureSubscriptionId == null) {\n resolveSubscriptionSetup();\n } else {\n disposeSignatureSubscriptionStateChangeObserver =\n this._onSubscriptionStateChange(\n signatureSubscriptionId,\n nextState => {\n if (nextState === 'subscribed') {\n resolveSubscriptionSetup();\n }\n },\n );\n }\n },\n );\n (async () => {\n await subscriptionSetupPromise;\n if (done) return;\n const response = await this.getSignatureStatus(signature);\n if (done) return;\n if (response == null) {\n return;\n }\n const {context, value} = response;\n if (value == null) {\n return;\n }\n if (value?.err) {\n reject(value.err);\n } else {\n switch (commitment) {\n case 'confirmed':\n case 'single':\n case 'singleGossip': {\n if (value.confirmationStatus === 'processed') {\n return;\n }\n break;\n }\n case 'finalized':\n case 'max':\n case 'root': {\n if (\n value.confirmationStatus === 'processed' ||\n value.confirmationStatus === 'confirmed'\n ) {\n return;\n }\n break;\n }\n // exhaust enums to ensure full coverage\n case 'processed':\n case 'recent':\n }\n done = true;\n resolve({\n __type: TransactionStatus.PROCESSED,\n response: {\n context,\n value,\n },\n });\n }\n })();\n } catch (err) {\n reject(err);\n }\n });\n const abortConfirmation = () => {\n if (disposeSignatureSubscriptionStateChangeObserver) {\n disposeSignatureSubscriptionStateChangeObserver();\n disposeSignatureSubscriptionStateChangeObserver = undefined;\n }\n if (signatureSubscriptionId != null) {\n this.removeSignatureListener(signatureSubscriptionId);\n signatureSubscriptionId = undefined;\n }\n };\n return {abortConfirmation, confirmationPromise};\n }\n\n private async confirmTransactionUsingBlockHeightExceedanceStrategy({\n commitment,\n strategy: {abortSignal, lastValidBlockHeight, signature},\n }: {\n commitment?: Commitment;\n strategy: BlockheightBasedTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.BLOCKHEIGHT_EXCEEDED;\n }>(resolve => {\n const checkBlockHeight = async () => {\n try {\n const blockHeight = await this.getBlockHeight(commitment);\n return blockHeight;\n } catch (_e) {\n return -1;\n }\n };\n (async () => {\n let currentBlockHeight = await checkBlockHeight();\n if (done) return;\n while (currentBlockHeight <= lastValidBlockHeight) {\n await sleep(1000);\n if (done) return;\n currentBlockHeight = await checkBlockHeight();\n if (done) return;\n }\n resolve({__type: TransactionStatus.BLOCKHEIGHT_EXCEEDED});\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredBlockheightExceededError(signature);\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingDurableNonceStrategy({\n commitment,\n strategy: {\n abortSignal,\n minContextSlot,\n nonceAccountPubkey,\n nonceValue,\n signature,\n },\n }: {\n commitment?: Commitment;\n strategy: DurableNonceTransactionConfirmationStrategy;\n }) {\n let done: boolean = false;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.NONCE_INVALID;\n slotInWhichNonceDidAdvance: number | null;\n }>(resolve => {\n let currentNonceValue: string | undefined = nonceValue;\n let lastCheckedSlot: number | null = null;\n const getCurrentNonceValue = async () => {\n try {\n const {context, value: nonceAccount} = await this.getNonceAndContext(\n nonceAccountPubkey,\n {\n commitment,\n minContextSlot,\n },\n );\n lastCheckedSlot = context.slot;\n return nonceAccount?.nonce;\n } catch (e) {\n // If for whatever reason we can't reach/read the nonce\n // account, just keep using the last-known value.\n return currentNonceValue;\n }\n };\n (async () => {\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n if (nonceValue !== currentNonceValue) {\n resolve({\n __type: TransactionStatus.NONCE_INVALID,\n slotInWhichNonceDidAdvance: lastCheckedSlot,\n });\n return;\n }\n await sleep(2000);\n if (done) return;\n currentNonceValue = await getCurrentNonceValue();\n if (done) return;\n }\n })();\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({commitment, signature});\n const cancellationPromise = this.getCancellationPromise(abortSignal);\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([\n cancellationPromise,\n confirmationPromise,\n expiryPromise,\n ]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n // Double check that the transaction is indeed unconfirmed.\n let signatureStatus:\n | RpcResponseAndContext\n | null\n | undefined;\n while (\n true // eslint-disable-line no-constant-condition\n ) {\n const status = await this.getSignatureStatus(signature);\n if (status == null) {\n break;\n }\n if (\n status.context.slot <\n (outcome.slotInWhichNonceDidAdvance ?? minContextSlot)\n ) {\n await sleep(400);\n continue;\n }\n signatureStatus = status;\n break;\n }\n if (signatureStatus?.value) {\n const commitmentForStatus = commitment || 'finalized';\n const {confirmationStatus} = signatureStatus.value;\n switch (commitmentForStatus) {\n case 'processed':\n case 'recent':\n if (\n confirmationStatus !== 'processed' &&\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'confirmed':\n case 'single':\n case 'singleGossip':\n if (\n confirmationStatus !== 'confirmed' &&\n confirmationStatus !== 'finalized'\n ) {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n case 'finalized':\n case 'max':\n case 'root':\n if (confirmationStatus !== 'finalized') {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n break;\n default:\n // Exhaustive switch.\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n ((_: never) => {})(commitmentForStatus);\n }\n result = {\n context: signatureStatus.context,\n value: {err: signatureStatus.value.err},\n };\n } else {\n throw new TransactionExpiredNonceInvalidError(signature);\n }\n }\n } finally {\n done = true;\n abortConfirmation();\n }\n return result;\n }\n\n private async confirmTransactionUsingLegacyTimeoutStrategy({\n commitment,\n signature,\n }: {\n commitment?: Commitment;\n signature: string;\n }) {\n let timeoutId;\n const expiryPromise = new Promise<{\n __type: TransactionStatus.TIMED_OUT;\n timeoutMs: number;\n }>(resolve => {\n let timeoutMs = this._confirmTransactionInitialTimeout || 60 * 1000;\n switch (commitment) {\n case 'processed':\n case 'recent':\n case 'single':\n case 'confirmed':\n case 'singleGossip': {\n timeoutMs = this._confirmTransactionInitialTimeout || 30 * 1000;\n break;\n }\n // exhaust enums to ensure full coverage\n case 'finalized':\n case 'max':\n case 'root':\n }\n timeoutId = setTimeout(\n () => resolve({__type: TransactionStatus.TIMED_OUT, timeoutMs}),\n timeoutMs,\n );\n });\n const {abortConfirmation, confirmationPromise} =\n this.getTransactionConfirmationPromise({\n commitment,\n signature,\n });\n let result: RpcResponseAndContext;\n try {\n const outcome = await Promise.race([confirmationPromise, expiryPromise]);\n if (outcome.__type === TransactionStatus.PROCESSED) {\n result = outcome.response;\n } else {\n throw new TransactionExpiredTimeoutError(\n signature,\n outcome.timeoutMs / 1000,\n );\n }\n } finally {\n clearTimeout(timeoutId);\n abortConfirmation();\n }\n return result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getClusterNodes(): Promise> {\n const unsafeRes = await this._rpcRequest('getClusterNodes', []);\n const res = create(unsafeRes, jsonRpcResult(array(ContactInfoResult)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get cluster nodes');\n }\n return res.result;\n }\n\n /**\n * Return the list of nodes that are currently participating in the cluster\n */\n async getVoteAccounts(commitment?: Commitment): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getVoteAccounts', args);\n const res = create(unsafeRes, GetVoteAccounts);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get vote accounts');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot that the node is processing\n */\n async getSlot(\n commitmentOrConfig?: Commitment | GetSlotConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlot', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot');\n }\n return res.result;\n }\n\n /**\n * Fetch the current slot leader of the cluster\n */\n async getSlotLeader(\n commitmentOrConfig?: Commitment | GetSlotLeaderConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getSlotLeader', args);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leader');\n }\n return res.result;\n }\n\n /**\n * Fetch `limit` number of slot leaders starting from `startSlot`\n *\n * @param startSlot fetch slot leaders starting from this slot\n * @param limit number of slot leaders to return\n */\n async getSlotLeaders(\n startSlot: number,\n limit: number,\n ): Promise> {\n const args = [startSlot, limit];\n const unsafeRes = await this._rpcRequest('getSlotLeaders', args);\n const res = create(unsafeRes, jsonRpcResult(array(PublicKeyFromString)));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get slot leaders');\n }\n return res.result;\n }\n\n /**\n * Fetch the current status of a signature\n */\n async getSignatureStatus(\n signature: TransactionSignature,\n config?: SignatureStatusConfig,\n ): Promise> {\n const {context, value: values} = await this.getSignatureStatuses(\n [signature],\n config,\n );\n assert(values.length === 1);\n const value = values[0];\n return {context, value};\n }\n\n /**\n * Fetch the current statuses of a batch of signatures\n */\n async getSignatureStatuses(\n signatures: Array,\n config?: SignatureStatusConfig,\n ): Promise>> {\n const params: any[] = [signatures];\n if (config) {\n params.push(config);\n }\n const unsafeRes = await this._rpcRequest('getSignatureStatuses', params);\n const res = create(unsafeRes, GetSignatureStatusesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get signature status');\n }\n return res.result;\n }\n\n /**\n * Fetch the current transaction count of the cluster\n */\n async getTransactionCount(\n commitmentOrConfig?: Commitment | GetTransactionCountConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransactionCount', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get transaction count',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the current total currency supply of the cluster in lamports\n *\n * @deprecated Deprecated since RPC v1.2.8. Please use {@link getSupply} instead.\n */\n async getTotalSupply(commitment?: Commitment): Promise {\n const result = await this.getSupply({\n commitment,\n excludeNonCirculatingAccountsList: true,\n });\n return result.value.total;\n }\n\n /**\n * Fetch the cluster InflationGovernor parameters\n */\n async getInflationGovernor(\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([], commitment);\n const unsafeRes = await this._rpcRequest('getInflationGovernor', args);\n const res = create(unsafeRes, GetInflationGovernorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation');\n }\n return res.result;\n }\n\n /**\n * Fetch the inflation reward for a list of addresses for an epoch\n */\n async getInflationReward(\n addresses: PublicKey[],\n epoch?: number,\n commitmentOrConfig?: Commitment | GetInflationRewardConfig,\n ): Promise<(InflationReward | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [addresses.map(pubkey => pubkey.toBase58())],\n commitment,\n undefined /* encoding */,\n {\n ...config,\n epoch: epoch != null ? epoch : config?.epoch,\n },\n );\n const unsafeRes = await this._rpcRequest('getInflationReward', args);\n const res = create(unsafeRes, GetInflationRewardResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation reward');\n }\n return res.result;\n }\n\n /**\n * Fetch the specific inflation values for the current epoch\n */\n async getInflationRate(): Promise {\n const unsafeRes = await this._rpcRequest('getInflationRate', []);\n const res = create(unsafeRes, GetInflationRateRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get inflation rate');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Info parameters\n */\n async getEpochInfo(\n commitmentOrConfig?: Commitment | GetEpochInfoConfig,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getEpochInfo', args);\n const res = create(unsafeRes, GetEpochInfoRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch info');\n }\n return res.result;\n }\n\n /**\n * Fetch the Epoch Schedule parameters\n */\n async getEpochSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getEpochSchedule', []);\n const res = create(unsafeRes, GetEpochScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get epoch schedule');\n }\n const epochSchedule = res.result;\n return new EpochSchedule(\n epochSchedule.slotsPerEpoch,\n epochSchedule.leaderScheduleSlotOffset,\n epochSchedule.warmup,\n epochSchedule.firstNormalEpoch,\n epochSchedule.firstNormalSlot,\n );\n }\n\n /**\n * Fetch the leader schedule for the current epoch\n * @return {Promise>}\n */\n async getLeaderSchedule(): Promise {\n const unsafeRes = await this._rpcRequest('getLeaderSchedule', []);\n const res = create(unsafeRes, GetLeaderScheduleRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get leader schedule');\n }\n return res.result;\n }\n\n /**\n * Fetch the minimum balance needed to exempt an account of `dataLength`\n * size from rent\n */\n async getMinimumBalanceForRentExemption(\n dataLength: number,\n commitment?: Commitment,\n ): Promise {\n const args = this._buildArgs([dataLength], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getMinimumBalanceForRentExemption',\n args,\n );\n const res = create(unsafeRes, GetMinimumBalanceForRentExemptionRpcResult);\n if ('error' in res) {\n console.warn('Unable to fetch minimum balance for rent exemption');\n return 0;\n }\n return res.result;\n }\n\n /**\n * Fetch a recent blockhash from the cluster, return with context\n * @return {Promise>}\n *\n * @deprecated Deprecated since RPC v1.9.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhashAndContext(commitment?: Commitment): Promise<\n RpcResponseAndContext<{\n blockhash: Blockhash;\n feeCalculator: FeeCalculator;\n }>\n > {\n const {\n context,\n value: {blockhash},\n } = await this.getLatestBlockhashAndContext(commitment);\n const feeCalculator = {\n get lamportsPerSignature(): number {\n throw new Error(\n 'The capability to fetch `lamportsPerSignature` using the `getRecentBlockhash` API is ' +\n 'no longer offered by the network. Use the `getFeeForMessage` API to obtain the fee ' +\n 'for a given message.',\n );\n },\n toJSON() {\n return {};\n },\n };\n return {\n context,\n value: {\n blockhash,\n feeCalculator,\n },\n };\n }\n\n /**\n * Fetch recent performance samples\n * @return {Promise>}\n */\n async getRecentPerformanceSamples(\n limit?: number,\n ): Promise> {\n const unsafeRes = await this._rpcRequest(\n 'getRecentPerformanceSamples',\n limit ? [limit] : [],\n );\n const res = create(unsafeRes, GetRecentPerformanceSamplesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent performance samples',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch the fee calculator for a recent blockhash from the cluster, return with context\n *\n * @deprecated Deprecated since RPC v1.9.0. Please use {@link getFeeForMessage} instead.\n */\n async getFeeCalculatorForBlockhash(\n blockhash: Blockhash,\n commitment?: Commitment,\n ): Promise> {\n const args = this._buildArgs([blockhash], commitment);\n const unsafeRes = await this._rpcRequest(\n 'getFeeCalculatorForBlockhash',\n args,\n );\n\n const res = create(unsafeRes, GetFeeCalculatorRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee calculator');\n }\n const {context, value} = res.result;\n return {\n context,\n value: value !== null ? value.feeCalculator : null,\n };\n }\n\n /**\n * Fetch the fee for a message from the cluster, return with context\n */\n async getFeeForMessage(\n message: VersionedMessage,\n commitment?: Commitment,\n ): Promise> {\n const wireMessage = toBuffer(message.serialize()).toString('base64');\n const args = this._buildArgs([wireMessage], commitment);\n const unsafeRes = await this._rpcRequest('getFeeForMessage', args);\n\n const res = create(unsafeRes, jsonRpcResultAndContext(nullable(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get fee for message');\n }\n if (res.result === null) {\n throw new Error('invalid blockhash');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of prioritization fees from recent blocks.\n */\n async getRecentPrioritizationFees(\n config?: GetRecentPrioritizationFeesConfig,\n ): Promise {\n const accounts = config?.lockedWritableAccounts?.map(key => key.toBase58());\n const args = accounts?.length ? [accounts] : [];\n const unsafeRes = await this._rpcRequest(\n 'getRecentPrioritizationFees',\n args,\n );\n const res = create(unsafeRes, GetRecentPrioritizationFeesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get recent prioritization fees',\n );\n }\n return res.result;\n }\n /**\n * Fetch a recent blockhash from the cluster\n * @return {Promise<{blockhash: Blockhash, feeCalculator: FeeCalculator}>}\n *\n * @deprecated Deprecated since RPC v1.8.0. Please use {@link getLatestBlockhash} instead.\n */\n async getRecentBlockhash(\n commitment?: Commitment,\n ): Promise<{blockhash: Blockhash; feeCalculator: FeeCalculator}> {\n try {\n const res = await this.getRecentBlockhashAndContext(commitment);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhash(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise {\n try {\n const res = await this.getLatestBlockhashAndContext(commitmentOrConfig);\n return res.value;\n } catch (e) {\n throw new Error('failed to get recent blockhash: ' + e);\n }\n }\n\n /**\n * Fetch the latest blockhash from the cluster\n * @return {Promise}\n */\n async getLatestBlockhashAndContext(\n commitmentOrConfig?: Commitment | GetLatestBlockhashConfig,\n ): Promise> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getLatestBlockhash', args);\n const res = create(unsafeRes, GetLatestBlockhashRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get latest blockhash');\n }\n return res.result;\n }\n\n /**\n * Returns whether a blockhash is still valid or not\n */\n async isBlockhashValid(\n blockhash: Blockhash,\n rawConfig?: IsBlockhashValidConfig,\n ): Promise> {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgs(\n [blockhash],\n commitment,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('isBlockhashValid', args);\n const res = create(unsafeRes, IsBlockhashValidRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to determine if the blockhash `' + blockhash + '`is valid',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch the node version\n */\n async getVersion(): Promise {\n const unsafeRes = await this._rpcRequest('getVersion', []);\n const res = create(unsafeRes, jsonRpcResult(VersionResult));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get version');\n }\n return res.result;\n }\n\n /**\n * Fetch the genesis hash\n */\n async getGenesisHash(): Promise {\n const unsafeRes = await this._rpcRequest('getGenesisHash', []);\n const res = create(unsafeRes, jsonRpcResult(string()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get genesis hash');\n }\n return res.result;\n }\n\n /**\n * Fetch a processed block from the cluster.\n *\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n async getBlock(\n slot: number,\n rawConfig?: GetBlockConfig,\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n /**\n * @deprecated Instead, call `getBlock` using a `GetVersionedBlockConfig` by\n * setting the `maxSupportedTransactionVersion` property.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n\n /**\n * Fetch a processed block from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | VersionedBlockResponse\n | VersionedAccountsModeBlockResponse\n | VersionedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n const {result} = res;\n return result\n ? {\n ...result,\n transactions: result.transactions.map(\n ({transaction, meta, version}) => ({\n meta,\n transaction: {\n ...transaction,\n message: versionedMessageFromResponse(\n version,\n transaction.message,\n ),\n },\n version,\n }),\n ),\n }\n : null;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(\n e as JSONRPCError,\n 'failed to get confirmed block',\n );\n }\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized block\n */\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'accounts'},\n ): Promise;\n\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig: GetVersionedBlockConfig & {transactionDetails: 'none'},\n ): Promise;\n // eslint-disable-next-line no-dupe-class-members\n async getParsedBlock(\n slot: number,\n rawConfig?: GetVersionedBlockConfig,\n ): Promise<\n | ParsedBlockResponse\n | ParsedAccountsModeBlockResponse\n | ParsedNoneModeBlockResponse\n | null\n > {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n try {\n switch (config?.transactionDetails) {\n case 'accounts': {\n const res = create(unsafeRes, GetParsedAccountsModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n case 'none': {\n const res = create(unsafeRes, GetParsedNoneModeBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n default: {\n const res = create(unsafeRes, GetParsedBlockRpcResult);\n if ('error' in res) {\n throw res.error;\n }\n return res.result;\n }\n }\n } catch (e) {\n throw new SolanaJSONRPCError(e as JSONRPCError, 'failed to get block');\n }\n }\n\n /*\n * Returns the current block height of the node\n */\n getBlockHeight = (() => {\n const requestPromises: {[hash: string]: Promise} = {};\n return async (\n commitmentOrConfig?: Commitment | GetBlockHeightConfig,\n ): Promise => {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [],\n commitment,\n undefined /* encoding */,\n config,\n );\n const requestHash = fastStableStringify(args);\n requestPromises[requestHash] =\n requestPromises[requestHash] ??\n (async () => {\n try {\n const unsafeRes = await this._rpcRequest('getBlockHeight', args);\n const res = create(unsafeRes, jsonRpcResult(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block height information',\n );\n }\n return res.result;\n } finally {\n delete requestPromises[requestHash];\n }\n })();\n return await requestPromises[requestHash];\n };\n })();\n\n /*\n * Returns recent block production information from the current or previous epoch\n */\n async getBlockProduction(\n configOrCommitment?: GetBlockProductionConfig | Commitment,\n ): Promise> {\n let extra: Omit | undefined;\n let commitment: Commitment | undefined;\n\n if (typeof configOrCommitment === 'string') {\n commitment = configOrCommitment;\n } else if (configOrCommitment) {\n const {commitment: c, ...rest} = configOrCommitment;\n commitment = c;\n extra = rest;\n }\n\n const args = this._buildArgs([], commitment, 'base64', extra);\n const unsafeRes = await this._rpcRequest('getBlockProduction', args);\n const res = create(unsafeRes, BlockProductionResponseStruct);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get block production information',\n );\n }\n\n return res.result;\n }\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n *\n * @deprecated Instead, call `getTransaction` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransaction(\n signature: string,\n rawConfig?: GetTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig: GetVersionedTransactionConfig,\n ): Promise;\n\n /**\n * Fetch a confirmed or finalized transaction from the cluster.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransaction(\n signature: string,\n rawConfig?: GetVersionedTransactionConfig,\n ): Promise {\n const {commitment, config} = extractCommitmentFromConfig(rawConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed or finalized transaction\n */\n async getParsedTransaction(\n signature: TransactionSignature,\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n */\n async getParsedTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetVersionedTransactionConfig | Finality,\n ): Promise<(ParsedTransactionWithMeta | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n 'jsonParsed',\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link TransactionResponse}.\n *\n * @deprecated Instead, call `getTransactions` using a\n * `GetVersionedTransactionConfig` by setting the\n * `maxSupportedTransactionVersion` property.\n */\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig?: GetTransactionConfig | Finality,\n ): Promise<(TransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]>;\n\n /**\n * Fetch transaction details for a batch of confirmed transactions.\n * Similar to {@link getParsedTransactions} but returns a {@link\n * VersionedTransactionResponse}.\n */\n // eslint-disable-next-line no-dupe-class-members\n async getTransactions(\n signatures: TransactionSignature[],\n commitmentOrConfig: GetVersionedTransactionConfig | Finality,\n ): Promise<(VersionedTransactionResponse | null)[]> {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment as Finality,\n undefined /* encoding */,\n config,\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transactions');\n }\n const result = res.result;\n if (!result) return result;\n\n return {\n ...result,\n transaction: {\n ...result.transaction,\n message: versionedMessageFromResponse(\n result.version,\n result.transaction.message,\n ),\n },\n };\n });\n\n return res;\n }\n\n /**\n * Fetch a list of Transactions and transaction statuses from the cluster\n * for a confirmed block.\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlock} instead.\n */\n async getConfirmedBlock(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([slot], commitment);\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetConfirmedBlockRpcResult);\n\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n\n const block = {\n ...result,\n transactions: result.transactions.map(({transaction, meta}) => {\n const message = new Message(transaction.message);\n return {\n meta,\n transaction: {\n ...transaction,\n message,\n },\n };\n }),\n };\n\n return {\n ...block,\n transactions: block.transactions.map(({transaction, meta}) => {\n return {\n meta,\n transaction: Transaction.populate(\n transaction.message,\n transaction.signatures,\n ),\n };\n }),\n };\n }\n\n /**\n * Fetch confirmed blocks between two slots\n */\n async getBlocks(\n startSlot: number,\n endSlot?: number,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n endSlot !== undefined ? [startSlot, endSlot] : [startSlot],\n commitment,\n );\n const unsafeRes = await this._rpcRequest('getBlocks', args);\n const res = create(unsafeRes, jsonRpcResult(array(number())));\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get blocks');\n }\n return res.result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a block, excluding rewards\n */\n async getBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a list of Signatures from the cluster for a confirmed block, excluding rewards\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getBlockSignatures} instead.\n */\n async getConfirmedBlockSignatures(\n slot: number,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [slot],\n commitment,\n undefined,\n {\n transactionDetails: 'signatures',\n rewards: false,\n },\n );\n const unsafeRes = await this._rpcRequest('getBlock', args);\n const res = create(unsafeRes, GetBlockSignaturesRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get confirmed block');\n }\n const result = res.result;\n if (!result) {\n throw new Error('Confirmed block ' + slot + ' not found');\n }\n return result;\n }\n\n /**\n * Fetch a transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getTransaction} instead.\n */\n async getConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed([signature], commitment);\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(res.error, 'failed to get transaction');\n }\n\n const result = res.result;\n if (!result) return result;\n\n const message = new Message(result.transaction.message);\n const signatures = result.transaction.signatures;\n return {\n ...result,\n transaction: Transaction.populate(message, signatures),\n };\n }\n\n /**\n * Fetch parsed transaction details for a confirmed transaction\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransaction} instead.\n */\n async getParsedConfirmedTransaction(\n signature: TransactionSignature,\n commitment?: Finality,\n ): Promise {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n const unsafeRes = await this._rpcRequest('getTransaction', args);\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transaction',\n );\n }\n return res.result;\n }\n\n /**\n * Fetch parsed transaction details for a batch of confirmed transactions\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getParsedTransactions} instead.\n */\n async getParsedConfirmedTransactions(\n signatures: TransactionSignature[],\n commitment?: Finality,\n ): Promise<(ParsedConfirmedTransaction | null)[]> {\n const batch = signatures.map(signature => {\n const args = this._buildArgsAtLeastConfirmed(\n [signature],\n commitment,\n 'jsonParsed',\n );\n return {\n methodName: 'getTransaction',\n args,\n };\n });\n\n const unsafeRes = await this._rpcBatchRequest(batch);\n const res = unsafeRes.map((unsafeRes: any) => {\n const res = create(unsafeRes, GetParsedTransactionRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed transactions',\n );\n }\n return res.result;\n });\n\n return res;\n }\n\n /**\n * Fetch a list of all the confirmed signatures for transactions involving an address\n * within a specified slot range. Max range allowed is 10,000 slots.\n *\n * @deprecated Deprecated since RPC v1.3. Please use {@link getConfirmedSignaturesForAddress2} instead.\n *\n * @param address queried address\n * @param startSlot start slot, inclusive\n * @param endSlot end slot, inclusive\n */\n async getConfirmedSignaturesForAddress(\n address: PublicKey,\n startSlot: number,\n endSlot: number,\n ): Promise> {\n let options: any = {};\n\n let firstAvailableBlock = await this.getFirstAvailableBlock();\n while (!('until' in options)) {\n startSlot--;\n if (startSlot <= 0 || startSlot < firstAvailableBlock) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(\n startSlot,\n 'finalized',\n );\n if (block.signatures.length > 0) {\n options.until =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n let highestConfirmedRoot = await this.getSlot('finalized');\n while (!('before' in options)) {\n endSlot++;\n if (endSlot > highestConfirmedRoot) {\n break;\n }\n\n try {\n const block = await this.getConfirmedBlockSignatures(endSlot);\n if (block.signatures.length > 0) {\n options.before =\n block.signatures[block.signatures.length - 1].toString();\n }\n } catch (err) {\n if (err instanceof Error && err.message.includes('skipped')) {\n continue;\n } else {\n throw err;\n }\n }\n }\n\n const confirmedSignatureInfo = await this.getConfirmedSignaturesForAddress2(\n address,\n options,\n );\n return confirmedSignatureInfo.map(info => info.signature);\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n * @deprecated Deprecated since RPC v1.7.0. Please use {@link getSignaturesForAddress} instead.\n */\n async getConfirmedSignaturesForAddress2(\n address: PublicKey,\n options?: ConfirmedSignaturesForAddress2Options,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest(\n 'getConfirmedSignaturesForAddress2',\n args,\n );\n const res = create(unsafeRes, GetConfirmedSignaturesForAddress2RpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get confirmed signatures for address',\n );\n }\n return res.result;\n }\n\n /**\n * Returns confirmed signatures for transactions involving an\n * address backwards in time from the provided signature or most recent confirmed block\n *\n *\n * @param address queried address\n * @param options\n */\n async getSignaturesForAddress(\n address: PublicKey,\n options?: SignaturesForAddressOptions,\n commitment?: Finality,\n ): Promise> {\n const args = this._buildArgsAtLeastConfirmed(\n [address.toBase58()],\n commitment,\n undefined,\n options,\n );\n const unsafeRes = await this._rpcRequest('getSignaturesForAddress', args);\n const res = create(unsafeRes, GetSignaturesForAddressRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n 'failed to get signatures for address',\n );\n }\n return res.result;\n }\n\n async getAddressLookupTable(\n accountKey: PublicKey,\n config?: GetAccountInfoConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n accountKey,\n config,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = new AddressLookupTableAccount({\n key: accountKey,\n state: AddressLookupTableAccount.deserialize(accountInfo.data),\n });\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster, return with context\n */\n async getNonceAndContext(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceAndContextConfig,\n ): Promise> {\n const {context, value: accountInfo} = await this.getAccountInfoAndContext(\n nonceAccount,\n commitmentOrConfig,\n );\n\n let value = null;\n if (accountInfo !== null) {\n value = NonceAccount.fromAccountData(accountInfo.data);\n }\n\n return {\n context,\n value,\n };\n }\n\n /**\n * Fetch the contents of a Nonce account from the cluster\n */\n async getNonce(\n nonceAccount: PublicKey,\n commitmentOrConfig?: Commitment | GetNonceConfig,\n ): Promise {\n return await this.getNonceAndContext(nonceAccount, commitmentOrConfig)\n .then(x => x.value)\n .catch(e => {\n throw new Error(\n 'failed to get nonce for account ' +\n nonceAccount.toBase58() +\n ': ' +\n e,\n );\n });\n }\n\n /**\n * Request an allocation of lamports to the specified address\n *\n * ```typescript\n * import { Connection, PublicKey, LAMPORTS_PER_SOL } from \"@solana/web3.js\";\n *\n * (async () => {\n * const connection = new Connection(\"https://api.testnet.solana.com\", \"confirmed\");\n * const myAddress = new PublicKey(\"2nr1bHFT86W9tGnyvmYW4vcHKsQB3sVQfnddasz4kExM\");\n * const signature = await connection.requestAirdrop(myAddress, LAMPORTS_PER_SOL);\n * await connection.confirmTransaction(signature);\n * })();\n * ```\n */\n async requestAirdrop(\n to: PublicKey,\n lamports: number,\n ): Promise {\n const unsafeRes = await this._rpcRequest('requestAirdrop', [\n to.toBase58(),\n lamports,\n ]);\n const res = create(unsafeRes, RequestAirdropRpcResult);\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `airdrop to ${to.toBase58()} failed`,\n );\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n async _blockhashWithExpiryBlockHeight(\n disableCache: boolean,\n ): Promise {\n if (!disableCache) {\n // Wait for polling to finish\n while (this._pollingBlockhash) {\n await sleep(100);\n }\n const timeSinceFetch = Date.now() - this._blockhashInfo.lastFetch;\n const expired = timeSinceFetch >= BLOCKHASH_CACHE_TIMEOUT_MS;\n if (this._blockhashInfo.latestBlockhash !== null && !expired) {\n return this._blockhashInfo.latestBlockhash;\n }\n }\n\n return await this._pollNewBlockhash();\n }\n\n /**\n * @internal\n */\n async _pollNewBlockhash(): Promise {\n this._pollingBlockhash = true;\n try {\n const startTime = Date.now();\n const cachedLatestBlockhash = this._blockhashInfo.latestBlockhash;\n const cachedBlockhash = cachedLatestBlockhash\n ? cachedLatestBlockhash.blockhash\n : null;\n for (let i = 0; i < 50; i++) {\n const latestBlockhash = await this.getLatestBlockhash('finalized');\n\n if (cachedBlockhash !== latestBlockhash.blockhash) {\n this._blockhashInfo = {\n latestBlockhash,\n lastFetch: Date.now(),\n transactionSignatures: [],\n simulatedSignatures: [],\n };\n return latestBlockhash;\n }\n\n // Sleep for approximately half a slot\n await sleep(MS_PER_SLOT / 2);\n }\n\n throw new Error(\n `Unable to obtain a new blockhash after ${Date.now() - startTime}ms`,\n );\n } finally {\n this._pollingBlockhash = false;\n }\n }\n\n /**\n * get the stake minimum delegation\n */\n async getStakeMinimumDelegation(\n config?: GetStakeMinimumDelegationConfig,\n ): Promise> {\n const {commitment, config: configArg} = extractCommitmentFromConfig(config);\n const args = this._buildArgs([], commitment, 'base64', configArg);\n const unsafeRes = await this._rpcRequest('getStakeMinimumDelegation', args);\n const res = create(unsafeRes, jsonRpcResultAndContext(number()));\n if ('error' in res) {\n throw new SolanaJSONRPCError(\n res.error,\n `failed to get stake minimum delegation`,\n );\n }\n return res.result;\n }\n\n /**\n * Simulate a transaction\n *\n * @deprecated Instead, call {@link simulateTransaction} with {@link\n * VersionedTransaction} and {@link SimulateTransactionConfig} parameters\n */\n simulateTransaction(\n transactionOrMessage: Transaction | Message,\n signers?: Array,\n includeAccounts?: boolean | Array,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n simulateTransaction(\n transaction: VersionedTransaction,\n config?: SimulateTransactionConfig,\n ): Promise>;\n\n /**\n * Simulate a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async simulateTransaction(\n transactionOrMessage: VersionedTransaction | Transaction | Message,\n configOrSigners?: SimulateTransactionConfig | Array,\n includeAccounts?: boolean | Array,\n ): Promise> {\n if ('message' in transactionOrMessage) {\n const versionedTx = transactionOrMessage;\n const wireTransaction = versionedTx.serialize();\n const encodedTransaction =\n Buffer.from(wireTransaction).toString('base64');\n if (Array.isArray(configOrSigners) || includeAccounts !== undefined) {\n throw new Error('Invalid arguments');\n }\n\n const config: any = configOrSigners || {};\n config.encoding = 'base64';\n if (!('commitment' in config)) {\n config.commitment = this.commitment;\n }\n\n if (\n configOrSigners &&\n typeof configOrSigners === 'object' &&\n 'innerInstructions' in configOrSigners\n ) {\n config.innerInstructions = configOrSigners.innerInstructions;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n throw new Error('failed to simulate transaction: ' + res.error.message);\n }\n return res.result;\n }\n\n let transaction;\n if (transactionOrMessage instanceof Transaction) {\n let originalTx: Transaction = transactionOrMessage;\n transaction = new Transaction();\n transaction.feePayer = originalTx.feePayer;\n transaction.instructions = transactionOrMessage.instructions;\n transaction.nonceInfo = originalTx.nonceInfo;\n transaction.signatures = originalTx.signatures;\n } else {\n transaction = Transaction.populate(transactionOrMessage);\n // HACK: this function relies on mutating the populated transaction\n transaction._message = transaction._json = undefined;\n }\n\n if (configOrSigners !== undefined && !Array.isArray(configOrSigners)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = configOrSigners;\n if (transaction.nonceInfo && signers) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash =\n await this._blockhashWithExpiryBlockHeight(disableCache);\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n\n if (!signers) break;\n\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (\n !this._blockhashInfo.simulatedSignatures.includes(signature) &&\n !this._blockhashInfo.transactionSignatures.includes(signature)\n ) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.simulatedSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const message = transaction._compile();\n const signData = message.serialize();\n const wireTransaction = transaction._serialize(signData);\n const encodedTransaction = wireTransaction.toString('base64');\n const config: any = {\n encoding: 'base64',\n commitment: this.commitment,\n };\n\n if (includeAccounts) {\n const addresses = (\n Array.isArray(includeAccounts)\n ? includeAccounts\n : message.nonProgramIds()\n ).map(key => key.toBase58());\n\n config['accounts'] = {\n encoding: 'base64',\n addresses,\n };\n }\n\n if (signers) {\n config.sigVerify = true;\n }\n\n if (\n configOrSigners &&\n typeof configOrSigners === 'object' &&\n 'innerInstructions' in configOrSigners\n ) {\n config.innerInstructions = configOrSigners.innerInstructions;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('simulateTransaction', args);\n const res = create(unsafeRes, SimulatedTransactionResponseStruct);\n if ('error' in res) {\n let logs;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n if (logs && Array.isArray(logs)) {\n const traceIndent = '\\n ';\n const logTrace = traceIndent + logs.join(traceIndent);\n console.error(res.error.message, logTrace);\n }\n }\n\n throw new SendTransactionError({\n action: 'simulate',\n signature: '',\n transactionMessage: res.error.message,\n logs: logs,\n });\n }\n return res.result;\n }\n\n /**\n * Sign and send a transaction\n *\n * @deprecated Instead, call {@link sendTransaction} with a {@link\n * VersionedTransaction}\n */\n sendTransaction(\n transaction: Transaction,\n signers: Array,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Send a signed transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n sendTransaction(\n transaction: VersionedTransaction,\n options?: SendOptions,\n ): Promise;\n\n /**\n * Sign and send a transaction\n */\n // eslint-disable-next-line no-dupe-class-members\n async sendTransaction(\n transaction: VersionedTransaction | Transaction,\n signersOrOptions?: Array | SendOptions,\n options?: SendOptions,\n ): Promise {\n if ('version' in transaction) {\n if (signersOrOptions && Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, signersOrOptions);\n }\n\n if (signersOrOptions === undefined || !Array.isArray(signersOrOptions)) {\n throw new Error('Invalid arguments');\n }\n\n const signers = signersOrOptions;\n if (transaction.nonceInfo) {\n transaction.sign(...signers);\n } else {\n let disableCache = this._disableBlockhashCaching;\n for (;;) {\n const latestBlockhash =\n await this._blockhashWithExpiryBlockHeight(disableCache);\n transaction.lastValidBlockHeight = latestBlockhash.lastValidBlockHeight;\n transaction.recentBlockhash = latestBlockhash.blockhash;\n transaction.sign(...signers);\n if (!transaction.signature) {\n throw new Error('!signature'); // should never happen\n }\n\n const signature = transaction.signature.toString('base64');\n if (!this._blockhashInfo.transactionSignatures.includes(signature)) {\n // The signature of this transaction has not been seen before with the\n // current recentBlockhash, all done. Let's break\n this._blockhashInfo.transactionSignatures.push(signature);\n break;\n } else {\n // This transaction would be treated as duplicate (its derived signature\n // matched to one of already recorded signatures).\n // So, we must fetch a new blockhash for a different signature by disabling\n // our cache not to wait for the cache expiration (BLOCKHASH_CACHE_TIMEOUT_MS).\n disableCache = true;\n }\n }\n }\n\n const wireTransaction = transaction.serialize();\n return await this.sendRawTransaction(wireTransaction, options);\n }\n\n /**\n * Send a transaction that has already been signed and serialized into the\n * wire format\n */\n async sendRawTransaction(\n rawTransaction: Buffer | Uint8Array | Array,\n options?: SendOptions,\n ): Promise {\n const encodedTransaction = toBuffer(rawTransaction).toString('base64');\n const result = await this.sendEncodedTransaction(\n encodedTransaction,\n options,\n );\n return result;\n }\n\n /**\n * Send a transaction that has already been signed, serialized into the\n * wire format, and encoded as a base64 string\n */\n async sendEncodedTransaction(\n encodedTransaction: string,\n options?: SendOptions,\n ): Promise {\n const config: any = {encoding: 'base64'};\n const skipPreflight = options && options.skipPreflight;\n const preflightCommitment =\n skipPreflight === true\n ? 'processed' // FIXME Remove when https://github.com/anza-xyz/agave/pull/483 is deployed.\n : (options && options.preflightCommitment) || this.commitment;\n\n if (options && options.maxRetries != null) {\n config.maxRetries = options.maxRetries;\n }\n if (options && options.minContextSlot != null) {\n config.minContextSlot = options.minContextSlot;\n }\n if (skipPreflight) {\n config.skipPreflight = skipPreflight;\n }\n if (preflightCommitment) {\n config.preflightCommitment = preflightCommitment;\n }\n\n const args = [encodedTransaction, config];\n const unsafeRes = await this._rpcRequest('sendTransaction', args);\n const res = create(unsafeRes, SendTransactionRpcResult);\n if ('error' in res) {\n let logs = undefined;\n if ('data' in res.error) {\n logs = res.error.data.logs;\n }\n\n throw new SendTransactionError({\n action: skipPreflight ? 'send' : 'simulate',\n signature: '',\n transactionMessage: res.error.message,\n logs: logs,\n });\n }\n return res.result;\n }\n\n /**\n * @internal\n */\n _wsOnOpen() {\n this._rpcWebSocketConnected = true;\n this._rpcWebSocketHeartbeat = setInterval(() => {\n // Ping server every 5s to prevent idle timeouts\n (async () => {\n try {\n await this._rpcWebSocket.notify('ping');\n // eslint-disable-next-line no-empty\n } catch {}\n })();\n }, 5000);\n this._updateSubscriptions();\n }\n\n /**\n * @internal\n */\n _wsOnError(err: Error) {\n this._rpcWebSocketConnected = false;\n console.error('ws error:', err.message);\n }\n\n /**\n * @internal\n */\n _wsOnClose(code: number) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketGeneration =\n (this._rpcWebSocketGeneration + 1) % Number.MAX_SAFE_INTEGER;\n if (this._rpcWebSocketIdleTimeout) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n }\n if (this._rpcWebSocketHeartbeat) {\n clearInterval(this._rpcWebSocketHeartbeat);\n this._rpcWebSocketHeartbeat = null;\n }\n\n if (code === 1000) {\n // explicit close, check if any subscriptions have been made since close\n this._updateSubscriptions();\n return;\n }\n\n // implicit close, prepare subscriptions for auto-reconnect\n this._subscriptionCallbacksByServerSubscriptionId = {};\n Object.entries(\n this._subscriptionsByHash as Record,\n ).forEach(([hash, subscription]) => {\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n });\n }\n\n /**\n * @internal\n */\n private _setSubscription(\n hash: SubscriptionConfigHash,\n nextSubscription: Subscription,\n ) {\n const prevState = this._subscriptionsByHash[hash]?.state;\n this._subscriptionsByHash[hash] = nextSubscription;\n if (prevState !== nextSubscription.state) {\n const stateChangeCallbacks =\n this._subscriptionStateChangeCallbacksByHash[hash];\n if (stateChangeCallbacks) {\n stateChangeCallbacks.forEach(cb => {\n try {\n cb(nextSubscription.state);\n // eslint-disable-next-line no-empty\n } catch {}\n });\n }\n }\n }\n\n /**\n * @internal\n */\n private _onSubscriptionStateChange(\n clientSubscriptionId: ClientSubscriptionId,\n callback: SubscriptionStateChangeCallback,\n ): SubscriptionStateChangeDisposeFn {\n const hash =\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n if (hash == null) {\n return () => {};\n }\n const stateChangeCallbacks = (this._subscriptionStateChangeCallbacksByHash[\n hash\n ] ||= new Set());\n stateChangeCallbacks.add(callback);\n return () => {\n stateChangeCallbacks.delete(callback);\n if (stateChangeCallbacks.size === 0) {\n delete this._subscriptionStateChangeCallbacksByHash[hash];\n }\n };\n }\n\n /**\n * @internal\n */\n async _updateSubscriptions() {\n if (Object.keys(this._subscriptionsByHash).length === 0) {\n if (this._rpcWebSocketConnected) {\n this._rpcWebSocketConnected = false;\n this._rpcWebSocketIdleTimeout = setTimeout(() => {\n this._rpcWebSocketIdleTimeout = null;\n try {\n this._rpcWebSocket.close();\n } catch (err) {\n // swallow error if socket has already been closed.\n if (err instanceof Error) {\n console.log(\n `Error when closing socket connection: ${err.message}`,\n );\n }\n }\n }, 500);\n }\n return;\n }\n\n if (this._rpcWebSocketIdleTimeout !== null) {\n clearTimeout(this._rpcWebSocketIdleTimeout);\n this._rpcWebSocketIdleTimeout = null;\n this._rpcWebSocketConnected = true;\n }\n\n if (!this._rpcWebSocketConnected) {\n this._rpcWebSocket.connect();\n return;\n }\n\n const activeWebSocketGeneration = this._rpcWebSocketGeneration;\n const isCurrentConnectionStillActive = () => {\n return activeWebSocketGeneration === this._rpcWebSocketGeneration;\n };\n\n await Promise.all(\n // Don't be tempted to change this to `Object.entries`. We call\n // `_updateSubscriptions` recursively when processing the state,\n // so it's important that we look up the *current* version of\n // each subscription, every time we process a hash.\n Object.keys(this._subscriptionsByHash).map(async hash => {\n const subscription = this._subscriptionsByHash[hash];\n if (subscription === undefined) {\n // This entry has since been deleted. Skip.\n return;\n }\n switch (subscription.state) {\n case 'pending':\n case 'unsubscribed':\n if (subscription.callbacks.size === 0) {\n /**\n * You can end up here when:\n *\n * - a subscription has recently unsubscribed\n * without having new callbacks added to it\n * while the unsubscribe was in flight, or\n * - when a pending subscription has its\n * listeners removed before a request was\n * sent to the server.\n *\n * Being that nobody is interested in this\n * subscription any longer, delete it.\n */\n delete this._subscriptionsByHash[hash];\n if (subscription.state === 'unsubscribed') {\n delete this._subscriptionCallbacksByServerSubscriptionId[\n subscription.serverSubscriptionId\n ];\n }\n await this._updateSubscriptions();\n return;\n }\n await (async () => {\n const {args, method} = subscription;\n try {\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribing',\n });\n const serverSubscriptionId: ServerSubscriptionId =\n (await this._rpcWebSocket.call(method, args)) as number;\n this._setSubscription(hash, {\n ...subscription,\n serverSubscriptionId,\n state: 'subscribed',\n });\n this._subscriptionCallbacksByServerSubscriptionId[\n serverSubscriptionId\n ] = subscription.callbacks;\n await this._updateSubscriptions();\n } catch (e) {\n console.error(\n `Received ${e instanceof Error ? '' : 'JSON-RPC '}error calling \\`${method}\\``,\n {\n args,\n error: e,\n },\n );\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'pending',\n });\n await this._updateSubscriptions();\n }\n })();\n break;\n case 'subscribed':\n if (subscription.callbacks.size === 0) {\n // By the time we successfully set up a subscription\n // with the server, the client stopped caring about it.\n // Tear it down now.\n await (async () => {\n const {serverSubscriptionId, unsubscribeMethod} = subscription;\n if (\n this._subscriptionsAutoDisposedByRpc.has(serverSubscriptionId)\n ) {\n /**\n * Special case.\n * If we're dealing with a subscription that has been auto-\n * disposed by the RPC, then we can skip the RPC call to\n * tear down the subscription here.\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.delete(\n serverSubscriptionId,\n );\n } else {\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribing',\n });\n try {\n await this._rpcWebSocket.call(unsubscribeMethod, [\n serverSubscriptionId,\n ]);\n } catch (e) {\n if (e instanceof Error) {\n console.error(`${unsubscribeMethod} error:`, e.message);\n }\n if (!isCurrentConnectionStillActive()) {\n return;\n }\n // TODO: Maybe add an 'errored' state or a retry limit?\n this._setSubscription(hash, {\n ...subscription,\n state: 'subscribed',\n });\n await this._updateSubscriptions();\n return;\n }\n }\n this._setSubscription(hash, {\n ...subscription,\n state: 'unsubscribed',\n });\n await this._updateSubscriptions();\n })();\n }\n break;\n case 'subscribing':\n case 'unsubscribing':\n break;\n }\n }),\n );\n }\n\n /**\n * @internal\n */\n private _handleServerNotification<\n TCallback extends SubscriptionConfig['callback'],\n >(\n serverSubscriptionId: ServerSubscriptionId,\n callbackArgs: Parameters,\n ): void {\n const callbacks =\n this._subscriptionCallbacksByServerSubscriptionId[serverSubscriptionId];\n if (callbacks === undefined) {\n return;\n }\n callbacks.forEach(cb => {\n try {\n cb(\n // I failed to find a way to convince TypeScript that `cb` is of type\n // `TCallback` which is certainly compatible with `Parameters`.\n // See https://github.com/microsoft/TypeScript/issues/47615\n // @ts-ignore\n ...callbackArgs,\n );\n } catch (e) {\n console.error(e);\n }\n });\n }\n\n /**\n * @internal\n */\n _wsOnAccountNotification(notification: object) {\n const {result, subscription} = create(\n notification,\n AccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n private _makeSubscription(\n subscriptionConfig: SubscriptionConfig,\n /**\n * When preparing `args` for a call to `_makeSubscription`, be sure\n * to carefully apply a default `commitment` property, if necessary.\n *\n * - If the user supplied a `commitment` use that.\n * - Otherwise, if the `Connection::commitment` is set, use that.\n * - Otherwise, set it to the RPC server default: `finalized`.\n *\n * This is extremely important to ensure that these two fundamentally\n * identical subscriptions produce the same identifying hash:\n *\n * - A subscription made without specifying a commitment.\n * - A subscription made where the commitment specified is the same\n * as the default applied to the subscription above.\n *\n * Example; these two subscriptions must produce the same hash:\n *\n * - An `accountSubscribe` subscription for `'PUBKEY'`\n * - An `accountSubscribe` subscription for `'PUBKEY'` with commitment\n * `'finalized'`.\n *\n * See the 'making a subscription with defaulted params omitted' test\n * in `connection-subscriptions.ts` for more.\n */\n args: IWSRequestParams,\n ): ClientSubscriptionId {\n const clientSubscriptionId = this._nextClientSubscriptionId++;\n const hash = fastStableStringify([subscriptionConfig.method, args]);\n const existingSubscription = this._subscriptionsByHash[hash];\n if (existingSubscription === undefined) {\n this._subscriptionsByHash[hash] = {\n ...subscriptionConfig,\n args,\n callbacks: new Set([subscriptionConfig.callback]),\n state: 'pending',\n };\n } else {\n existingSubscription.callbacks.add(subscriptionConfig.callback);\n }\n this._subscriptionHashByClientSubscriptionId[clientSubscriptionId] = hash;\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ] = async () => {\n delete this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n delete this._subscriptionHashByClientSubscriptionId[clientSubscriptionId];\n const subscription = this._subscriptionsByHash[hash];\n assert(\n subscription !== undefined,\n `Could not find a \\`Subscription\\` when tearing down client subscription #${clientSubscriptionId}`,\n );\n subscription.callbacks.delete(subscriptionConfig.callback);\n await this._updateSubscriptions();\n };\n this._updateSubscriptions();\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked whenever the specified account changes\n *\n * @param publicKey Public key of the account to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param config\n * @return subscription id\n */\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n config?: AccountSubscriptionConfig,\n ): ClientSubscriptionId;\n /** @deprecated Instead, pass in an {@link AccountSubscriptionConfig} */\n // eslint-disable-next-line no-dupe-class-members\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId;\n // eslint-disable-next-line no-dupe-class-members\n onAccountChange(\n publicKey: PublicKey,\n callback: AccountChangeCallback,\n commitmentOrConfig?: Commitment | AccountSubscriptionConfig,\n ): ClientSubscriptionId {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [publicKey.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64',\n config,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'accountSubscribe',\n unsubscribeMethod: 'accountUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'account change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnProgramAccountNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n ProgramAccountNotificationResult,\n );\n this._handleServerNotification(subscription, [\n {\n accountId: result.value.pubkey,\n accountInfo: result.value.account,\n },\n result.context,\n ]);\n }\n\n /**\n * Register a callback to be invoked whenever accounts owned by the\n * specified program change\n *\n * @param programId Public key of the program to monitor\n * @param callback Function to invoke whenever the account is changed\n * @param config\n * @return subscription id\n */\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n config?: ProgramAccountSubscriptionConfig,\n ): ClientSubscriptionId;\n /** @deprecated Instead, pass in a {@link ProgramAccountSubscriptionConfig} */\n // eslint-disable-next-line no-dupe-class-members\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitment?: Commitment,\n filters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId;\n // eslint-disable-next-line no-dupe-class-members\n onProgramAccountChange(\n programId: PublicKey,\n callback: ProgramAccountChangeCallback,\n commitmentOrConfig?: Commitment | ProgramAccountSubscriptionConfig,\n maybeFilters?: GetProgramAccountsFilter[],\n ): ClientSubscriptionId {\n const {commitment, config} =\n extractCommitmentFromConfig(commitmentOrConfig);\n const args = this._buildArgs(\n [programId.toBase58()],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n 'base64' /* encoding */,\n config\n ? config\n : maybeFilters\n ? {filters: applyDefaultMemcmpEncodingToFilters(maybeFilters)}\n : undefined /* extra */,\n );\n return this._makeSubscription(\n {\n callback,\n method: 'programSubscribe',\n unsubscribeMethod: 'programUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister an account notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeProgramAccountChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'program account change',\n );\n }\n\n /**\n * Registers a callback to be invoked whenever logs are emitted.\n */\n onLogs(\n filter: LogsFilter,\n callback: LogsCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [typeof filter === 'object' ? {mentions: [filter.toString()]} : filter],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n return this._makeSubscription(\n {\n callback,\n method: 'logsSubscribe',\n unsubscribeMethod: 'logsUnsubscribe',\n },\n args,\n );\n }\n\n /**\n * Deregister a logs callback.\n *\n * @param clientSubscriptionId client subscription id to deregister.\n */\n async removeOnLogsListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(clientSubscriptionId, 'logs');\n }\n\n /**\n * @internal\n */\n _wsOnLogsNotification(notification: Object) {\n const {result, subscription} = create(notification, LogsNotificationResult);\n this._handleServerNotification(subscription, [\n result.value,\n result.context,\n ]);\n }\n\n /**\n * @internal\n */\n _wsOnSlotNotification(notification: Object) {\n const {result, subscription} = create(notification, SlotNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot changes\n *\n * @param callback Function to invoke whenever the slot changes\n * @return subscription id\n */\n onSlotChange(callback: SlotChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotSubscribe',\n unsubscribeMethod: 'slotUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSlotChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot change',\n );\n }\n\n /**\n * @internal\n */\n _wsOnSlotUpdatesNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SlotUpdateNotificationResult,\n );\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon slot updates. {@link SlotUpdate}'s\n * may be useful to track live progress of a cluster.\n *\n * @param callback Function to invoke whenever the slot updates\n * @return subscription id\n */\n onSlotUpdate(callback: SlotUpdateCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'slotsUpdatesSubscribe',\n unsubscribeMethod: 'slotsUpdatesUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a slot update notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSlotUpdateListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'slot update',\n );\n }\n\n /**\n * @internal\n */\n\n private async _unsubscribeClientSubscription(\n clientSubscriptionId: ClientSubscriptionId,\n subscriptionName: string,\n ) {\n const dispose =\n this._subscriptionDisposeFunctionsByClientSubscriptionId[\n clientSubscriptionId\n ];\n if (dispose) {\n await dispose();\n } else {\n console.warn(\n 'Ignored unsubscribe request because an active subscription with id ' +\n `\\`${clientSubscriptionId}\\` for '${subscriptionName}' events ` +\n 'could not be found.',\n );\n }\n }\n\n _buildArgs(\n args: Array,\n override?: Commitment,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment || encoding || extra) {\n let options: any = {};\n if (encoding) {\n options.encoding = encoding;\n }\n if (commitment) {\n options.commitment = commitment;\n }\n if (extra) {\n options = Object.assign(options, extra);\n }\n args.push(options);\n }\n return args;\n }\n\n /**\n * @internal\n */\n _buildArgsAtLeastConfirmed(\n args: Array,\n override?: Finality,\n encoding?: 'jsonParsed' | 'base64',\n extra?: any,\n ): Array {\n const commitment = override || this._commitment;\n if (commitment && !['confirmed', 'finalized'].includes(commitment)) {\n throw new Error(\n 'Using Connection with default commitment: `' +\n this._commitment +\n '`, but method requires at least `confirmed`',\n );\n }\n return this._buildArgs(args, override, encoding, extra);\n }\n\n /**\n * @internal\n */\n _wsOnSignatureNotification(notification: Object) {\n const {result, subscription} = create(\n notification,\n SignatureNotificationResult,\n );\n if (result.value !== 'receivedSignature') {\n /**\n * Special case.\n * After a signature is processed, RPCs automatically dispose of the\n * subscription on the server side. We need to track which of these\n * subscriptions have been disposed in such a way, so that we know\n * whether the client is dealing with a not-yet-processed signature\n * (in which case we must tear down the server subscription) or an\n * already-processed signature (in which case the client can simply\n * clear out the subscription locally without telling the server).\n *\n * NOTE: There is a proposal to eliminate this special case, here:\n * https://github.com/solana-labs/solana/issues/18892\n */\n this._subscriptionsAutoDisposedByRpc.add(subscription);\n }\n this._handleServerNotification(\n subscription,\n result.value === 'receivedSignature'\n ? [{type: 'received'}, result.context]\n : [{type: 'status', result: result.value}, result.context],\n );\n }\n\n /**\n * Register a callback to be invoked upon signature updates\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param commitment Specify the commitment level signature must reach before notification\n * @return subscription id\n */\n onSignature(\n signature: TransactionSignature,\n callback: SignatureResultCallback,\n commitment?: Commitment,\n ): ClientSubscriptionId {\n const args = this._buildArgs(\n [signature],\n commitment || this._commitment || 'finalized', // Apply connection/server default.\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n if (notification.type === 'status') {\n callback(notification.result, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Register a callback to be invoked when a transaction is\n * received and/or processed.\n *\n * @param signature Transaction signature string in base 58\n * @param callback Function to invoke on signature notifications\n * @param options Enable received notifications and set the commitment\n * level that signature must reach before notification\n * @return subscription id\n */\n onSignatureWithOptions(\n signature: TransactionSignature,\n callback: SignatureSubscriptionCallback,\n options?: SignatureSubscriptionOptions,\n ): ClientSubscriptionId {\n const {commitment, ...extra} = {\n ...options,\n commitment:\n (options && options.commitment) || this._commitment || 'finalized', // Apply connection/server default.\n };\n const args = this._buildArgs(\n [signature],\n commitment,\n undefined /* encoding */,\n extra,\n );\n const clientSubscriptionId = this._makeSubscription(\n {\n callback: (notification, context) => {\n callback(notification, context);\n // Signatures subscriptions are auto-removed by the RPC service\n // so no need to explicitly send an unsubscribe message.\n try {\n this.removeSignatureListener(clientSubscriptionId);\n // eslint-disable-next-line no-empty\n } catch (_err) {\n // Already removed.\n }\n },\n method: 'signatureSubscribe',\n unsubscribeMethod: 'signatureUnsubscribe',\n },\n args,\n );\n return clientSubscriptionId;\n }\n\n /**\n * Deregister a signature notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeSignatureListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'signature result',\n );\n }\n\n /**\n * @internal\n */\n _wsOnRootNotification(notification: Object) {\n const {result, subscription} = create(notification, RootNotificationResult);\n this._handleServerNotification(subscription, [result]);\n }\n\n /**\n * Register a callback to be invoked upon root changes\n *\n * @param callback Function to invoke whenever the root changes\n * @return subscription id\n */\n onRootChange(callback: RootChangeCallback): ClientSubscriptionId {\n return this._makeSubscription(\n {\n callback,\n method: 'rootSubscribe',\n unsubscribeMethod: 'rootUnsubscribe',\n },\n [] /* args */,\n );\n }\n\n /**\n * Deregister a root notification callback\n *\n * @param clientSubscriptionId client subscription id to deregister\n */\n async removeRootChangeListener(\n clientSubscriptionId: ClientSubscriptionId,\n ): Promise {\n await this._unsubscribeClientSubscription(\n clientSubscriptionId,\n 'root change',\n );\n }\n}\n","import {generateKeypair, getPublicKey, Ed25519Keypair} from './utils/ed25519';\nimport {PublicKey} from './publickey';\n\n/**\n * Keypair signer interface\n */\nexport interface Signer {\n publicKey: PublicKey;\n secretKey: Uint8Array;\n}\n\n/**\n * An account keypair used for signing transactions.\n */\nexport class Keypair {\n private _keypair: Ed25519Keypair;\n\n /**\n * Create a new keypair instance.\n * Generate random keypair if no {@link Ed25519Keypair} is provided.\n *\n * @param {Ed25519Keypair} keypair ed25519 keypair\n */\n constructor(keypair?: Ed25519Keypair) {\n this._keypair = keypair ?? generateKeypair();\n }\n\n /**\n * Generate a new random keypair\n *\n * @returns {Keypair} Keypair\n */\n static generate(): Keypair {\n return new Keypair(generateKeypair());\n }\n\n /**\n * Create a keypair from a raw secret key byte array.\n *\n * This method should only be used to recreate a keypair from a previously\n * generated secret key. Generating keypairs from a random seed should be done\n * with the {@link Keypair.fromSeed} method.\n *\n * @throws error if the provided secret key is invalid and validation is not skipped.\n *\n * @param secretKey secret key byte array\n * @param options skip secret key validation\n *\n * @returns {Keypair} Keypair\n */\n static fromSecretKey(\n secretKey: Uint8Array,\n options?: {skipValidation?: boolean},\n ): Keypair {\n if (secretKey.byteLength !== 64) {\n throw new Error('bad secret key size');\n }\n const publicKey = secretKey.slice(32, 64);\n if (!options || !options.skipValidation) {\n const privateScalar = secretKey.slice(0, 32);\n const computedPublicKey = getPublicKey(privateScalar);\n for (let ii = 0; ii < 32; ii++) {\n if (publicKey[ii] !== computedPublicKey[ii]) {\n throw new Error('provided secretKey is invalid');\n }\n }\n }\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * Generate a keypair from a 32 byte seed.\n *\n * @param seed seed byte array\n *\n * @returns {Keypair} Keypair\n */\n static fromSeed(seed: Uint8Array): Keypair {\n const publicKey = getPublicKey(seed);\n const secretKey = new Uint8Array(64);\n secretKey.set(seed);\n secretKey.set(publicKey, 32);\n return new Keypair({publicKey, secretKey});\n }\n\n /**\n * The public key for this keypair\n *\n * @returns {PublicKey} PublicKey\n */\n get publicKey(): PublicKey {\n return new PublicKey(this._keypair.publicKey);\n }\n\n /**\n * The raw secret key for this keypair\n * @returns {Uint8Array} Secret key in an array of Uint8 bytes\n */\n get secretKey(): Uint8Array {\n return new Uint8Array(this._keypair.secretKey);\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport {getU64Encoder} from '@solana/codecs-numbers';\n\nimport * as Layout from '../../layout';\nimport {PublicKey} from '../../publickey';\nimport * as bigintLayout from '../../utils/bigint';\nimport {SystemProgram} from '../system';\nimport {TransactionInstruction} from '../../transaction';\nimport {decodeData, encodeData, IInstructionInputData} from '../../instruction';\n\nexport * from './state';\n\nexport type CreateLookupTableParams = {\n /** Account used to derive and control the new address lookup table. */\n authority: PublicKey;\n /** Account that will fund the new address lookup table. */\n payer: PublicKey;\n /** A recent slot must be used in the derivation path for each initialized table. */\n recentSlot: bigint | number;\n};\n\nexport type FreezeLookupTableParams = {\n /** Address lookup table account to freeze. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type ExtendLookupTableParams = {\n /** Address lookup table account to extend. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Account that will fund the table reallocation.\n * Not required if the reallocation has already been funded. */\n payer?: PublicKey;\n /** List of Public Keys to be added to the lookup table. */\n addresses: Array;\n};\n\nexport type DeactivateLookupTableParams = {\n /** Address lookup table account to deactivate. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n};\n\nexport type CloseLookupTableParams = {\n /** Address lookup table account to close. */\n lookupTable: PublicKey;\n /** Account which is the current authority. */\n authority: PublicKey;\n /** Recipient of closed account lamports. */\n recipient: PublicKey;\n};\n\n/**\n * An enumeration of valid LookupTableInstructionType's\n */\nexport type LookupTableInstructionType =\n | 'CreateLookupTable'\n | 'ExtendLookupTable'\n | 'CloseLookupTable'\n | 'FreezeLookupTable'\n | 'DeactivateLookupTable';\n\ntype LookupTableInstructionInputData = {\n CreateLookupTable: IInstructionInputData &\n Readonly<{\n recentSlot: bigint;\n bumpSeed: number;\n }>;\n FreezeLookupTable: IInstructionInputData;\n ExtendLookupTable: IInstructionInputData &\n Readonly<{\n numberOfAddresses: bigint;\n addresses: Array;\n }>;\n DeactivateLookupTable: IInstructionInputData;\n CloseLookupTable: IInstructionInputData;\n};\n\n/**\n * An enumeration of valid address lookup table InstructionType's\n * @internal\n */\nexport const LOOKUP_TABLE_INSTRUCTION_LAYOUTS = Object.freeze({\n CreateLookupTable: {\n index: 0,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CreateLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64('recentSlot'),\n BufferLayout.u8('bumpSeed'),\n ]),\n },\n FreezeLookupTable: {\n index: 1,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['FreezeLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n ExtendLookupTable: {\n index: 2,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['ExtendLookupTable']\n >([\n BufferLayout.u32('instruction'),\n bigintLayout.u64(),\n BufferLayout.seq(\n Layout.publicKey(),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'addresses',\n ),\n ]),\n },\n DeactivateLookupTable: {\n index: 3,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['DeactivateLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n CloseLookupTable: {\n index: 4,\n layout: BufferLayout.struct<\n LookupTableInstructionInputData['CloseLookupTable']\n >([BufferLayout.u32('instruction')]),\n },\n});\n\nexport class AddressLookupTableInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): LookupTableInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const index = instructionTypeLayout.decode(instruction.data);\n\n let type: LookupTableInstructionType | undefined;\n for (const [layoutType, layout] of Object.entries(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS,\n )) {\n if ((layout as any).index == index) {\n type = layoutType as LookupTableInstructionType;\n break;\n }\n }\n if (!type) {\n throw new Error(\n 'Invalid Instruction. Should be a LookupTable Instruction',\n );\n }\n return type;\n }\n\n static decodeCreateLookupTable(\n instruction: TransactionInstruction,\n ): CreateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 4);\n\n const {recentSlot} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable,\n instruction.data,\n );\n\n return {\n authority: instruction.keys[1].pubkey,\n payer: instruction.keys[2].pubkey,\n recentSlot: Number(recentSlot),\n };\n }\n\n static decodeExtendLookupTable(\n instruction: TransactionInstruction,\n ): ExtendLookupTableParams {\n this.checkProgramId(instruction.programId);\n if (instruction.keys.length < 2) {\n throw new Error(\n `invalid instruction; found ${instruction.keys.length} keys, expected at least 2`,\n );\n }\n\n const {addresses} = decodeData(\n LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable,\n instruction.data,\n );\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n payer:\n instruction.keys.length > 2 ? instruction.keys[2].pubkey : undefined,\n addresses: addresses.map(buffer => new PublicKey(buffer)),\n };\n }\n\n static decodeCloseLookupTable(\n instruction: TransactionInstruction,\n ): CloseLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 3);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n recipient: instruction.keys[2].pubkey,\n };\n }\n\n static decodeFreezeLookupTable(\n instruction: TransactionInstruction,\n ): FreezeLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n static decodeDeactivateLookupTable(\n instruction: TransactionInstruction,\n ): DeactivateLookupTableParams {\n this.checkProgramId(instruction.programId);\n this.checkKeysLength(instruction.keys, 2);\n\n return {\n lookupTable: instruction.keys[0].pubkey,\n authority: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(AddressLookupTableProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not AddressLookupTable Program',\n );\n }\n }\n /**\n * @internal\n */\n static checkKeysLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\nexport class AddressLookupTableProgram {\n /**\n * @internal\n */\n constructor() {}\n\n static programId: PublicKey = new PublicKey(\n 'AddressLookupTab1e1111111111111111111111111',\n );\n\n static createLookupTable(params: CreateLookupTableParams) {\n const [lookupTableAddress, bumpSeed] = PublicKey.findProgramAddressSync(\n [\n params.authority.toBuffer(),\n getU64Encoder().encode(params.recentSlot) as Uint8Array,\n ],\n this.programId,\n );\n\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CreateLookupTable;\n const data = encodeData(type, {\n recentSlot: BigInt(params.recentSlot),\n bumpSeed: bumpSeed,\n });\n\n const keys = [\n {\n pubkey: lookupTableAddress,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n ];\n\n return [\n new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n }),\n lookupTableAddress,\n ] as [TransactionInstruction, PublicKey];\n }\n\n static freezeLookupTable(params: FreezeLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.FreezeLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static extendLookupTable(params: ExtendLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.ExtendLookupTable;\n const data = encodeData(type, {\n addresses: params.addresses.map(addr => addr.toBytes()),\n });\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n if (params.payer) {\n keys.push(\n {\n pubkey: params.payer,\n isSigner: true,\n isWritable: true,\n },\n {\n pubkey: SystemProgram.programId,\n isSigner: false,\n isWritable: false,\n },\n );\n }\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static deactivateLookupTable(params: DeactivateLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.DeactivateLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n\n static closeLookupTable(params: CloseLookupTableParams) {\n const type = LOOKUP_TABLE_INSTRUCTION_LAYOUTS.CloseLookupTable;\n const data = encodeData(type);\n\n const keys = [\n {\n pubkey: params.lookupTable,\n isSigner: false,\n isWritable: true,\n },\n {\n pubkey: params.authority,\n isSigner: true,\n isWritable: false,\n },\n {\n pubkey: params.recipient,\n isSigner: false,\n isWritable: true,\n },\n ];\n\n return new TransactionInstruction({\n programId: this.programId,\n keys: keys,\n data: data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport {u64} from '../utils/bigint';\n\n/**\n * Compute Budget Instruction class\n */\nexport class ComputeBudgetInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a compute budget instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): ComputeBudgetInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u8('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: ComputeBudgetInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS,\n )) {\n if (layout.index == typeIndex) {\n type = ixType as ComputeBudgetInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error(\n 'Instruction type incorrect; not a ComputeBudgetInstruction',\n );\n }\n\n return type;\n }\n\n /**\n * Decode request units compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestUnits(\n instruction: TransactionInstruction,\n ): RequestUnitsParams {\n this.checkProgramId(instruction.programId);\n const {units, additionalFee} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits,\n instruction.data,\n );\n return {units, additionalFee};\n }\n\n /**\n * Decode request heap frame compute budget instruction and retrieve the instruction params.\n */\n static decodeRequestHeapFrame(\n instruction: TransactionInstruction,\n ): RequestHeapFrameParams {\n this.checkProgramId(instruction.programId);\n const {bytes} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame,\n instruction.data,\n );\n return {bytes};\n }\n\n /**\n * Decode set compute unit limit compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitLimit(\n instruction: TransactionInstruction,\n ): SetComputeUnitLimitParams {\n this.checkProgramId(instruction.programId);\n const {units} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit,\n instruction.data,\n );\n return {units};\n }\n\n /**\n * Decode set compute unit price compute budget instruction and retrieve the instruction params.\n */\n static decodeSetComputeUnitPrice(\n instruction: TransactionInstruction,\n ): SetComputeUnitPriceParams {\n this.checkProgramId(instruction.programId);\n const {microLamports} = decodeData(\n COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice,\n instruction.data,\n );\n return {microLamports};\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(ComputeBudgetProgram.programId)) {\n throw new Error(\n 'invalid instruction; programId is not ComputeBudgetProgram',\n );\n }\n }\n}\n\n/**\n * An enumeration of valid ComputeBudgetInstructionType's\n */\nexport type ComputeBudgetInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof ComputeBudgetInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'RequestUnits'\n | 'RequestHeapFrame'\n | 'SetComputeUnitLimit'\n | 'SetComputeUnitPrice';\n\ntype ComputeBudgetInstructionInputData = {\n RequestUnits: IInstructionInputData & Readonly;\n RequestHeapFrame: IInstructionInputData & Readonly;\n SetComputeUnitLimit: IInstructionInputData &\n Readonly;\n SetComputeUnitPrice: IInstructionInputData &\n Readonly;\n};\n\n/**\n * Request units instruction params\n */\nexport interface RequestUnitsParams {\n /** Units to request for transaction-wide compute */\n units: number;\n /** Prioritization fee lamports */\n additionalFee: number;\n}\n\n/**\n * Request heap frame instruction params\n */\nexport type RequestHeapFrameParams = {\n /** Requested transaction-wide program heap size in bytes. Must be multiple of 1024. Applies to each program, including CPIs. */\n bytes: number;\n};\n\n/**\n * Set compute unit limit instruction params\n */\nexport interface SetComputeUnitLimitParams {\n /** Transaction-wide compute unit limit */\n units: number;\n}\n\n/**\n * Set compute unit price instruction params\n */\nexport interface SetComputeUnitPriceParams {\n /** Transaction compute unit price used for prioritization fees */\n microLamports: number | bigint;\n}\n\n/**\n * An enumeration of valid ComputeBudget InstructionType's\n * @internal\n */\nexport const COMPUTE_BUDGET_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in ComputeBudgetInstructionType]: InstructionType<\n ComputeBudgetInstructionInputData[Instruction]\n >;\n}>({\n RequestUnits: {\n index: 0,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestUnits']\n >([\n BufferLayout.u8('instruction'),\n BufferLayout.u32('units'),\n BufferLayout.u32('additionalFee'),\n ]),\n },\n RequestHeapFrame: {\n index: 1,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['RequestHeapFrame']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('bytes')]),\n },\n SetComputeUnitLimit: {\n index: 2,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitLimit']\n >([BufferLayout.u8('instruction'), BufferLayout.u32('units')]),\n },\n SetComputeUnitPrice: {\n index: 3,\n layout: BufferLayout.struct<\n ComputeBudgetInstructionInputData['SetComputeUnitPrice']\n >([BufferLayout.u8('instruction'), u64('microLamports')]),\n },\n});\n\n/**\n * Factory class for transaction instructions to interact with the Compute Budget program\n */\nexport class ComputeBudgetProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Compute Budget program\n */\n static programId: PublicKey = new PublicKey(\n 'ComputeBudget111111111111111111111111111111',\n );\n\n /**\n * @deprecated Instead, call {@link setComputeUnitLimit} and/or {@link setComputeUnitPrice}\n */\n static requestUnits(params: RequestUnitsParams): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestUnits;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static requestHeapFrame(\n params: RequestHeapFrameParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.RequestHeapFrame;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitLimit(\n params: SetComputeUnitLimitParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitLimit;\n const data = encodeData(type, params);\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n\n static setComputeUnitPrice(\n params: SetComputeUnitPriceParams,\n ): TransactionInstruction {\n const type = COMPUTE_BUDGET_INSTRUCTION_LAYOUTS.SetComputeUnitPrice;\n const data = encodeData(type, {\n microLamports: BigInt(params.microLamports),\n });\n return new TransactionInstruction({\n keys: [],\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\n\nimport {Keypair} from '../keypair';\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {sign} from '../utils/ed25519';\n\nconst PRIVATE_KEY_BYTES = 64;\nconst PUBLIC_KEY_BYTES = 32;\nconst SIGNATURE_BYTES = 64;\n\n/**\n * Params for creating an ed25519 instruction using a public key\n */\nexport type CreateEd25519InstructionWithPublicKeyParams = {\n publicKey: Uint8Array;\n message: Uint8Array;\n signature: Uint8Array;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an ed25519 instruction using a private key\n */\nexport type CreateEd25519InstructionWithPrivateKeyParams = {\n privateKey: Uint8Array;\n message: Uint8Array;\n instructionIndex?: number;\n};\n\nconst ED25519_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n padding: number;\n publicKeyInstructionIndex: number;\n publicKeyOffset: number;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u8('padding'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u16('signatureInstructionIndex'),\n BufferLayout.u16('publicKeyOffset'),\n BufferLayout.u16('publicKeyInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u16('messageInstructionIndex'),\n]);\n\nexport class Ed25519Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the ed25519 program\n */\n static programId: PublicKey = new PublicKey(\n 'Ed25519SigVerify111111111111111111111111111',\n );\n\n /**\n * Create an ed25519 instruction with a public key and signature. The\n * public key must be a buffer that is 32 bytes long, and the signature\n * must be a buffer of 64 bytes.\n */\n static createInstructionWithPublicKey(\n params: CreateEd25519InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, instructionIndex} = params;\n\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public Key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n assert(\n signature.length === SIGNATURE_BYTES,\n `Signature must be ${SIGNATURE_BYTES} bytes but received ${signature.length} bytes`,\n );\n\n const publicKeyOffset = ED25519_INSTRUCTION_LAYOUT.span;\n const signatureOffset = publicKeyOffset + publicKey.length;\n const messageDataOffset = signatureOffset + signature.length;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(messageDataOffset + message.length);\n\n const index =\n instructionIndex == null\n ? 0xffff // An index of `u16::MAX` makes it default to the current instruction.\n : instructionIndex;\n\n ED25519_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n padding: 0,\n signatureOffset,\n signatureInstructionIndex: index,\n publicKeyOffset,\n publicKeyInstructionIndex: index,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: index,\n },\n instructionData,\n );\n\n instructionData.fill(publicKey, publicKeyOffset);\n instructionData.fill(signature, signatureOffset);\n instructionData.fill(message, messageDataOffset);\n\n return new TransactionInstruction({\n keys: [],\n programId: Ed25519Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an ed25519 instruction with a private key. The private key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateEd25519InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey, message, instructionIndex} = params;\n\n assert(\n privateKey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${privateKey.length} bytes`,\n );\n\n try {\n const keypair = Keypair.fromSecretKey(privateKey);\n const publicKey = keypair.publicKey.toBytes();\n const signature = sign(message, keypair.secretKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);\nconst _32n = /* @__PURE__ */ BigInt(32);\n// BigUint64Array is too slow as per 2024, so we implement it using Uint32Array.\n// TODO: re-check https://issues.chromium.org/issues/42212588\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 { abytes, aexists, anumber, aoutput } 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 anumber(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 aexists(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 aexists(this, false);\n abytes(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 anumber(bytes);\n return this.xofInto(new Uint8Array(bytes));\n }\n digestInto(out) {\n aoutput(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","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^70 hashes/sec (2^95 hashes/year) as per late 2024.\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);\nexport class 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());\n/**\n * SHA2-224 hash function\n */\nexport const sha224 = /* @__PURE__ */ wrapConstructor(() => new SHA224());\n//# sourceMappingURL=sha256.js.map","import { ahash, abytes, aexists } 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 ahash(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 aexists(this);\n this.iHash.update(buf);\n return this;\n }\n digestInto(out) {\n aexists(this);\n abytes(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 * @example\n * import { hmac } from '@noble/hashes/hmac';\n * import { sha256 } from '@noble/hashes/sha2';\n * const mac1 = hmac(sha256, 'key', 'message');\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, pippenger, } from './curve.js';\nimport * as mod from './modular.js';\nimport * as ut from './utils.js';\nimport { ensureBytes, memoized, abool } from './utils.js';\nfunction validateSigVerOpts(opts) {\n if (opts.lowS !== undefined)\n abool('lowS', opts.lowS);\n if (opts.prehash !== undefined)\n abool('prehash', opts.prehash);\n}\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('invalid 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('invalid endomorphism, expected beta: bigint and splitScalar: function');\n }\n }\n return Object.freeze({ ...opts });\n}\nconst { bytesToNumberBE: b2n, hexToBytes: h2b } = ut;\n/**\n * ASN.1 DER encoding utilities. ASN is very complex & fragile. Format:\n *\n * [0x30 (SEQUENCE), bytelength, 0x02 (INTEGER), intLength, R, 0x02 (INTEGER), intLength, S]\n *\n * Docs: https://letsencrypt.org/docs/a-warm-welcome-to-asn1-and-der/, https://luca.ntop.org/Teaching/Appunti/asn1.html\n */\nexport const DER = {\n // asn.1 DER encoding utils\n Err: class DERErr extends Error {\n constructor(m = '') {\n super(m);\n }\n },\n // Basic building block is TLV (Tag-Length-Value)\n _tlv: {\n encode: (tag, data) => {\n const { Err: E } = DER;\n if (tag < 0 || tag > 256)\n throw new E('tlv.encode: wrong tag');\n if (data.length & 1)\n throw new E('tlv.encode: unpadded data');\n const dataLen = data.length / 2;\n const len = ut.numberToHexUnpadded(dataLen);\n if ((len.length / 2) & 128)\n throw new E('tlv.encode: long form length too big');\n // length of length with long form flag\n const lenLen = dataLen > 127 ? ut.numberToHexUnpadded((len.length / 2) | 128) : '';\n const t = ut.numberToHexUnpadded(tag);\n return t + lenLen + len + data;\n },\n // v - value, l - left bytes (unparsed)\n decode(tag, data) {\n const { Err: E } = DER;\n let pos = 0;\n if (tag < 0 || tag > 256)\n throw new E('tlv.encode: wrong tag');\n if (data.length < 2 || data[pos++] !== tag)\n throw new E('tlv.decode: wrong tlv');\n const first = data[pos++];\n const isLong = !!(first & 128); // First bit of first length byte is flag for short/long form\n let length = 0;\n if (!isLong)\n length = first;\n else {\n // Long form: [longFlag(1bit), lengthLength(7bit), length (BE)]\n const lenLen = first & 127;\n if (!lenLen)\n throw new E('tlv.decode(long): indefinite length not supported');\n if (lenLen > 4)\n throw new E('tlv.decode(long): byte length is too big'); // this will overflow u32 in js\n const lengthBytes = data.subarray(pos, pos + lenLen);\n if (lengthBytes.length !== lenLen)\n throw new E('tlv.decode: length bytes not complete');\n if (lengthBytes[0] === 0)\n throw new E('tlv.decode(long): zero leftmost byte');\n for (const b of lengthBytes)\n length = (length << 8) | b;\n pos += lenLen;\n if (length < 128)\n throw new E('tlv.decode(long): not minimal encoding');\n }\n const v = data.subarray(pos, pos + length);\n if (v.length !== length)\n throw new E('tlv.decode: wrong value length');\n return { v, l: data.subarray(pos + length) };\n },\n },\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 _int: {\n encode(num) {\n const { Err: E } = DER;\n if (num < _0n)\n throw new E('integer: negative integers are not allowed');\n let hex = ut.numberToHexUnpadded(num);\n // Pad with zero byte if negative flag is present\n if (Number.parseInt(hex[0], 16) & 0b1000)\n hex = '00' + hex;\n if (hex.length & 1)\n throw new E('unexpected DER parsing assertion: unpadded hex');\n return hex;\n },\n decode(data) {\n const { Err: E } = DER;\n if (data[0] & 128)\n throw new E('invalid signature integer: negative');\n if (data[0] === 0x00 && !(data[1] & 128))\n throw new E('invalid signature integer: unnecessary leading zero');\n return b2n(data);\n },\n },\n toSig(hex) {\n // parse DER signature\n const { Err: E, _int: int, _tlv: tlv } = DER;\n const data = typeof hex === 'string' ? h2b(hex) : hex;\n ut.abytes(data);\n const { v: seqBytes, l: seqLeftBytes } = tlv.decode(0x30, data);\n if (seqLeftBytes.length)\n throw new E('invalid signature: left bytes after parsing');\n const { v: rBytes, l: rLeftBytes } = tlv.decode(0x02, seqBytes);\n const { v: sBytes, l: sLeftBytes } = tlv.decode(0x02, rLeftBytes);\n if (sLeftBytes.length)\n throw new E('invalid signature: left bytes after parsing');\n return { r: int.decode(rBytes), s: int.decode(sBytes) };\n },\n hexFromSig(sig) {\n const { _tlv: tlv, _int: int } = DER;\n const rs = tlv.encode(0x02, int.encode(sig.r));\n const ss = tlv.encode(0x02, int.encode(sig.s));\n const seq = rs + ss;\n return tlv.encode(0x30, seq);\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 Fn = mod.Field(CURVE.n, CURVE.nBitLength);\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 ut.inRange(num, _1n, 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: 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 private 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('invalid private key, expected hex or ' + nByteLength + ' bytes, got ' + typeof key);\n }\n if (wrapPrivateKey)\n num = mod.mod(num, N); // disabled by default, enabled for BLS\n ut.aInRange('private key', num, _1n, N); // num in range [1..N-1]\n return num;\n }\n function assertPrjPoint(other) {\n if (!(other instanceof Point))\n throw new Error('ProjectivePoint expected');\n }\n // Memoized toAffine / validity check. They are heavy. Points are immutable.\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 const toAffineMemo = memoized((p, iz) => {\n const { px: x, py: y, pz: z } = p;\n // Fast-path for normalized points\n if (Fp.eql(z, Fp.ONE))\n return { x, y };\n const is0 = p.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 // NOTE: on exception this will crash 'cached' and no value will be set.\n // Otherwise true will be return\n const assertValidMemo = memoized((p) => {\n if (p.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 invalid representation of ZERO.\n if (CURVE.allowInfinityPoint && !Fp.is0(p.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 } = p.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 (!p.isTorsionFree())\n throw new Error('bad point: not in prime-order subgroup');\n return true;\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 Object.freeze(this);\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 // Multiscalar Multiplication\n static msm(points, scalars) {\n return pippenger(Point, Fn, points, scalars);\n }\n // \"Private method\", don't use it directly\n _setWindowSize(windowSize) {\n wnaf.setWindowSize(this, windowSize);\n }\n // A point on curve is valid if it conforms to equation.\n assertValidity() {\n assertValidMemo(this);\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, n, Point.normalizeZ);\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(sc) {\n const { endo, n: N } = CURVE;\n ut.aInRange('scalar', sc, _0n, N);\n const I = Point.ZERO;\n if (sc === _0n)\n return I;\n if (this.is0() || sc === _1n)\n return this;\n // Case a: no endomorphism. Case b: has precomputes.\n if (!endo || wnaf.hasPrecomputes(this))\n return wnaf.wNAFCachedUnsafe(this, sc, Point.normalizeZ);\n // Case c: endomorphism\n let { k1neg, k1, k2neg, k2 } = endo.splitScalar(sc);\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 const { endo, n: N } = CURVE;\n ut.aInRange('scalar', scalar, _1n, N);\n let point, fake; // Fake point is used to const-time mult\n if (endo) {\n const { k1neg, k1, k2neg, k2 } = endo.splitScalar(scalar);\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(scalar);\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 return toAffineMemo(this, iz);\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 abool('isCompressed', isCompressed);\n this.assertValidity();\n return toBytes(Point, this, isCompressed);\n }\n toHex(isCompressed = true) {\n abool('isCompressed', isCompressed);\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}\n/**\n * Creates short weierstrass curve and ECDSA signature methods for it.\n * @example\n * import { Field } from '@noble/curves/abstract/modular';\n * // Before that, define BigInt-s: a, b, p, n, Gx, Gy\n * const curve = weierstrass({ a, b, Fp: Field(p), n, Gx, Gy, h: 1n })\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 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 abool('isCompressed', isCompressed);\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 (!ut.inRange(x, _1n, Fp.ORDER))\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 const cl = compressedLen;\n const ul = uncompressedLen;\n throw new Error('invalid Point, expected length of ' + cl + ', or uncompressed ' + ul + ', got ' + len);\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 ut.aInRange('r', this.r, _1n, CURVE_ORDER); // r in [1..N]\n ut.aInRange('s', this.s, _1n, CURVE_ORDER); // s in [1..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 // Our custom check \"just in case\"\n if (bytes.length > 8192)\n throw new Error('input is too large');\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 ut.aInRange('num < 2^' + CURVE.nBitLength, num, _0n, ORDER_MASK);\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,\n // this will be invalid at least for P521. 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 validateSigVerOpts(opts);\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 const { lowS, prehash, format } = opts;\n // Verify opts, deduce signature format\n validateSigVerOpts(opts);\n if ('strict' in opts)\n throw new Error('options.strict was renamed to lowS');\n if (format !== undefined && format !== 'compact' && format !== 'der')\n throw new Error('format must be compact or der');\n const isHex = typeof sg === 'string' || ut.isBytes(sg);\n const isObj = !isHex &&\n !format &&\n typeof sg === 'object' &&\n sg !== null &&\n typeof sg.r === 'bigint' &&\n typeof sg.s === 'bigint';\n if (!isHex && !isObj)\n throw new Error('invalid signature, expected Uint8Array, hex string or Signature instance');\n let _sig = undefined;\n let P;\n try {\n if (isObj)\n _sig = new Signature(sg.r, sg.s);\n if (isHex) {\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 if (format !== 'compact')\n _sig = Signature.fromDER(sg);\n }\n catch (derError) {\n if (!(derError instanceof DER.Err))\n throw derError;\n }\n if (!_sig && format !== 'der')\n _sig = Signature.fromCompact(sg);\n }\n P = Point.fromHex(publicKey);\n }\n catch (error) {\n return false;\n }\n if (!_sig)\n return false;\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 { inRange, aInRange, 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 (!Fpk1.eql(Fpk1.sqr(root), y))\n throw new Error('Cannot find square root');\n return root;\n}\nconst Fpk1 = Field(secp256k1P, undefined, undefined, { sqrt: sqrtMod });\n/**\n * secp256k1 short weierstrass curve and ECDSA signatures over it.\n */\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: Fpk1, // 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);\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 aInRange('x', x, _1n, secp256k1P); // 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}\nconst num = bytesToNumberBE;\n/**\n * Create tagged hash, convert it to bigint, reduce modulo-n.\n */\nfunction challenge(...args) {\n return modN(num(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 ^ num(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(num(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(num(pub)); // P = lift_x(int(pk)); fail if that fails\n const r = num(sig.subarray(0, 32)); // Let r = int(sig[0:32]); fail if r ≥ p.\n if (!inRange(r, _1n, secp256k1P))\n return false;\n const s = num(sig.subarray(32, 64)); // Let s = int(sig[32:64]); fail if s ≥ n.\n if (!inRange(s, _1n, secp256k1N))\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}\n/**\n * Schnorr signatures over secp256k1.\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(Fpk1, [\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(Fpk1, {\n A: BigInt('0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533'),\n B: BigInt('1771'),\n Z: Fpk1.create(BigInt('-11')),\n}))();\nconst htf = /* @__PURE__ */ (() => createHasher(secp256k1.ProjectivePoint, (scalars) => {\n const { x, y } = mapSWU(Fpk1.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: Fpk1.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","import {secp256k1} from '@noble/curves/secp256k1';\n\nexport const ecdsaSign = (\n msgHash: Parameters[0],\n privKey: Parameters[1],\n) => {\n const signature = secp256k1.sign(msgHash, privKey);\n return [signature.toCompactRawBytes(), signature.recovery!] as const;\n};\nexport const isValidPrivateKey = secp256k1.utils.isValidPrivateKey;\nexport const publicKeyCreate = secp256k1.getPublicKey;\n","import {Buffer} from 'buffer';\nimport * as BufferLayout from '@solana/buffer-layout';\nimport {keccak_256} from '@noble/hashes/sha3';\n\nimport {PublicKey} from '../publickey';\nimport {TransactionInstruction} from '../transaction';\nimport assert from '../utils/assert';\nimport {publicKeyCreate, ecdsaSign} from '../utils/secp256k1';\nimport {toBuffer} from '../utils/to-buffer';\n\nconst PRIVATE_KEY_BYTES = 32;\nconst ETHEREUM_ADDRESS_BYTES = 20;\nconst PUBLIC_KEY_BYTES = 64;\nconst SIGNATURE_OFFSETS_SERIALIZED_SIZE = 11;\n\n/**\n * Params for creating an secp256k1 instruction using a public key\n */\nexport type CreateSecp256k1InstructionWithPublicKeyParams = {\n publicKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using an Ethereum address\n */\nexport type CreateSecp256k1InstructionWithEthAddressParams = {\n ethAddress: Buffer | Uint8Array | Array | string;\n message: Buffer | Uint8Array | Array;\n signature: Buffer | Uint8Array | Array;\n recoveryId: number;\n instructionIndex?: number;\n};\n\n/**\n * Params for creating an secp256k1 instruction using a private key\n */\nexport type CreateSecp256k1InstructionWithPrivateKeyParams = {\n privateKey: Buffer | Uint8Array | Array;\n message: Buffer | Uint8Array | Array;\n instructionIndex?: number;\n};\n\nconst SECP256K1_INSTRUCTION_LAYOUT = BufferLayout.struct<\n Readonly<{\n ethAddress: Uint8Array;\n ethAddressInstructionIndex: number;\n ethAddressOffset: number;\n messageDataOffset: number;\n messageDataSize: number;\n messageInstructionIndex: number;\n numSignatures: number;\n recoveryId: number;\n signature: Uint8Array;\n signatureInstructionIndex: number;\n signatureOffset: number;\n }>\n>([\n BufferLayout.u8('numSignatures'),\n BufferLayout.u16('signatureOffset'),\n BufferLayout.u8('signatureInstructionIndex'),\n BufferLayout.u16('ethAddressOffset'),\n BufferLayout.u8('ethAddressInstructionIndex'),\n BufferLayout.u16('messageDataOffset'),\n BufferLayout.u16('messageDataSize'),\n BufferLayout.u8('messageInstructionIndex'),\n BufferLayout.blob(20, 'ethAddress'),\n BufferLayout.blob(64, 'signature'),\n BufferLayout.u8('recoveryId'),\n]);\n\nexport class Secp256k1Program {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the secp256k1 program\n */\n static programId: PublicKey = new PublicKey(\n 'KeccakSecp256k11111111111111111111111111111',\n );\n\n /**\n * Construct an Ethereum address from a secp256k1 public key buffer.\n * @param {Buffer} publicKey a 64 byte secp256k1 public key buffer\n */\n static publicKeyToEthAddress(\n publicKey: Buffer | Uint8Array | Array,\n ): Buffer {\n assert(\n publicKey.length === PUBLIC_KEY_BYTES,\n `Public key must be ${PUBLIC_KEY_BYTES} bytes but received ${publicKey.length} bytes`,\n );\n\n try {\n return Buffer.from(keccak_256(toBuffer(publicKey))).slice(\n -ETHEREUM_ADDRESS_BYTES,\n );\n } catch (error) {\n throw new Error(`Error constructing Ethereum address: ${error}`);\n }\n }\n\n /**\n * Create an secp256k1 instruction with a public key. The public key\n * must be a buffer that is 64 bytes long.\n */\n static createInstructionWithPublicKey(\n params: CreateSecp256k1InstructionWithPublicKeyParams,\n ): TransactionInstruction {\n const {publicKey, message, signature, recoveryId, instructionIndex} =\n params;\n return Secp256k1Program.createInstructionWithEthAddress({\n ethAddress: Secp256k1Program.publicKeyToEthAddress(publicKey),\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n }\n\n /**\n * Create an secp256k1 instruction with an Ethereum address. The address\n * must be a hex string or a buffer that is 20 bytes long.\n */\n static createInstructionWithEthAddress(\n params: CreateSecp256k1InstructionWithEthAddressParams,\n ): TransactionInstruction {\n const {\n ethAddress: rawAddress,\n message,\n signature,\n recoveryId,\n instructionIndex = 0,\n } = params;\n\n let ethAddress;\n if (typeof rawAddress === 'string') {\n if (rawAddress.startsWith('0x')) {\n ethAddress = Buffer.from(rawAddress.substr(2), 'hex');\n } else {\n ethAddress = Buffer.from(rawAddress, 'hex');\n }\n } else {\n ethAddress = rawAddress;\n }\n\n assert(\n ethAddress.length === ETHEREUM_ADDRESS_BYTES,\n `Address must be ${ETHEREUM_ADDRESS_BYTES} bytes but received ${ethAddress.length} bytes`,\n );\n\n const dataStart = 1 + SIGNATURE_OFFSETS_SERIALIZED_SIZE;\n const ethAddressOffset = dataStart;\n const signatureOffset = dataStart + ethAddress.length;\n const messageDataOffset = signatureOffset + signature.length + 1;\n const numSignatures = 1;\n\n const instructionData = Buffer.alloc(\n SECP256K1_INSTRUCTION_LAYOUT.span + message.length,\n );\n\n SECP256K1_INSTRUCTION_LAYOUT.encode(\n {\n numSignatures,\n signatureOffset,\n signatureInstructionIndex: instructionIndex,\n ethAddressOffset,\n ethAddressInstructionIndex: instructionIndex,\n messageDataOffset,\n messageDataSize: message.length,\n messageInstructionIndex: instructionIndex,\n signature: toBuffer(signature),\n ethAddress: toBuffer(ethAddress),\n recoveryId,\n },\n instructionData,\n );\n\n instructionData.fill(toBuffer(message), SECP256K1_INSTRUCTION_LAYOUT.span);\n\n return new TransactionInstruction({\n keys: [],\n programId: Secp256k1Program.programId,\n data: instructionData,\n });\n }\n\n /**\n * Create an secp256k1 instruction with a private key. The private key\n * must be a buffer that is 32 bytes long.\n */\n static createInstructionWithPrivateKey(\n params: CreateSecp256k1InstructionWithPrivateKeyParams,\n ): TransactionInstruction {\n const {privateKey: pkey, message, instructionIndex} = params;\n\n assert(\n pkey.length === PRIVATE_KEY_BYTES,\n `Private key must be ${PRIVATE_KEY_BYTES} bytes but received ${pkey.length} bytes`,\n );\n\n try {\n const privateKey = toBuffer(pkey);\n const publicKey = publicKeyCreate(\n privateKey,\n false /* isCompressed */,\n ).slice(1); // throw away leading byte\n const messageHash = Buffer.from(keccak_256(toBuffer(message)));\n const [signature, recoveryId] = ecdsaSign(messageHash, privateKey);\n\n return this.createInstructionWithPublicKey({\n publicKey,\n message,\n signature,\n recoveryId,\n instructionIndex,\n });\n } catch (error) {\n throw new Error(`Error creating instruction; ${error}`);\n }\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {\n SYSVAR_CLOCK_PUBKEY,\n SYSVAR_RENT_PUBKEY,\n SYSVAR_STAKE_HISTORY_PUBKEY,\n} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Address of the stake config account which configures the rate\n * of stake warmup and cooldown as well as the slashing penalty.\n */\nexport const STAKE_CONFIG_ID = new PublicKey(\n 'StakeConfig11111111111111111111111111111111',\n);\n\n/**\n * Stake account authority info\n */\nexport class Authorized {\n /** stake authority */\n staker: PublicKey;\n /** withdraw authority */\n withdrawer: PublicKey;\n\n /**\n * Create a new Authorized object\n * @param staker the stake authority\n * @param withdrawer the withdraw authority\n */\n constructor(staker: PublicKey, withdrawer: PublicKey) {\n this.staker = staker;\n this.withdrawer = withdrawer;\n }\n}\n\ntype AuthorizedRaw = Readonly<{\n staker: Uint8Array;\n withdrawer: Uint8Array;\n}>;\n\n/**\n * Stake account lockup info\n */\nexport class Lockup {\n /** Unix timestamp of lockup expiration */\n unixTimestamp: number;\n /** Epoch of lockup expiration */\n epoch: number;\n /** Lockup custodian authority */\n custodian: PublicKey;\n\n /**\n * Create a new Lockup object\n */\n constructor(unixTimestamp: number, epoch: number, custodian: PublicKey) {\n this.unixTimestamp = unixTimestamp;\n this.epoch = epoch;\n this.custodian = custodian;\n }\n\n /**\n * Default, inactive Lockup value\n */\n static default: Lockup = new Lockup(0, 0, PublicKey.default);\n}\n\ntype LockupRaw = Readonly<{\n custodian: Uint8Array;\n epoch: number;\n unixTimestamp: number;\n}>;\n\n/**\n * Create stake account transaction params\n */\nexport type CreateStakeAccountParams = {\n /** Address of the account which will fund creation */\n fromPubkey: PublicKey;\n /** Address of the new stake account */\n stakePubkey: PublicKey;\n /** Authorities of the new stake account */\n authorized: Authorized;\n /** Lockup of the new stake account */\n lockup?: Lockup;\n /** Funding amount */\n lamports: number;\n};\n\n/**\n * Create stake account with seed transaction params\n */\nexport type CreateStakeAccountWithSeedParams = {\n fromPubkey: PublicKey;\n stakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n authorized: Authorized;\n lockup?: Lockup;\n lamports: number;\n};\n\n/**\n * Initialize stake instruction params\n */\nexport type InitializeStakeParams = {\n stakePubkey: PublicKey;\n authorized: Authorized;\n lockup?: Lockup;\n};\n\n/**\n * Delegate stake instruction params\n */\nexport type DelegateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n votePubkey: PublicKey;\n};\n\n/**\n * Authorize stake instruction params\n */\nexport type AuthorizeStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Authorize stake instruction params using a derived key\n */\nexport type AuthorizeWithSeedStakeParams = {\n stakePubkey: PublicKey;\n authorityBase: PublicKey;\n authoritySeed: string;\n authorityOwner: PublicKey;\n newAuthorizedPubkey: PublicKey;\n stakeAuthorizationType: StakeAuthorizationType;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Split stake instruction params\n */\nexport type SplitStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n lamports: number;\n};\n\n/**\n * Split with seed transaction params\n */\nexport type SplitStakeWithSeedParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n splitStakePubkey: PublicKey;\n basePubkey: PublicKey;\n seed: string;\n lamports: number;\n};\n\n/**\n * Withdraw stake instruction params\n */\nexport type WithdrawStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n toPubkey: PublicKey;\n lamports: number;\n custodianPubkey?: PublicKey;\n};\n\n/**\n * Deactivate stake instruction params\n */\nexport type DeactivateStakeParams = {\n stakePubkey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Merge stake instruction params\n */\nexport type MergeStakeParams = {\n stakePubkey: PublicKey;\n sourceStakePubKey: PublicKey;\n authorizedPubkey: PublicKey;\n};\n\n/**\n * Stake Instruction class\n */\nexport class StakeInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a stake instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): StakeInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: StakeInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(STAKE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as StakeInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a StakeInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode a initialize stake instruction and retrieve the instruction params.\n */\n static decodeInitialize(\n instruction: TransactionInstruction,\n ): InitializeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {authorized, lockup} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Initialize,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorized: new Authorized(\n new PublicKey(authorized.staker),\n new PublicKey(authorized.withdrawer),\n ),\n lockup: new Lockup(\n lockup.unixTimestamp,\n lockup.epoch,\n new PublicKey(lockup.custodian),\n ),\n };\n }\n\n /**\n * Decode a delegate stake instruction and retrieve the instruction params.\n */\n static decodeDelegate(\n instruction: TransactionInstruction,\n ): DelegateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 6);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Delegate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n votePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[5].pubkey,\n };\n }\n\n /**\n * Decode an authorize stake instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {newAuthorized, stakeAuthorizationType} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n const o: AuthorizeStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode an authorize-with-seed stake instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeWithSeedStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 2);\n\n const {\n newAuthorized,\n stakeAuthorizationType,\n authoritySeed,\n authorityOwner,\n } = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n const o: AuthorizeWithSeedStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n authorityBase: instruction.keys[1].pubkey,\n authoritySeed: authoritySeed,\n authorityOwner: new PublicKey(authorityOwner),\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n stakeAuthorizationType: {\n index: stakeAuthorizationType,\n },\n };\n if (instruction.keys.length > 3) {\n o.custodianPubkey = instruction.keys[3].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a split stake instruction and retrieve the instruction params.\n */\n static decodeSplit(instruction: TransactionInstruction): SplitStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Split,\n instruction.data,\n );\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n splitStakePubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n lamports,\n };\n }\n\n /**\n * Decode a merge stake instruction and retrieve the instruction params.\n */\n static decodeMerge(instruction: TransactionInstruction): MergeStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Merge, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n sourceStakePubKey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n };\n }\n\n /**\n * Decode a withdraw stake instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 5);\n const {lamports} = decodeData(\n STAKE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n const o: WithdrawStakeParams = {\n stakePubkey: instruction.keys[0].pubkey,\n toPubkey: instruction.keys[1].pubkey,\n authorizedPubkey: instruction.keys[4].pubkey,\n lamports,\n };\n if (instruction.keys.length > 5) {\n o.custodianPubkey = instruction.keys[5].pubkey;\n }\n return o;\n }\n\n /**\n * Decode a deactivate stake instruction and retrieve the instruction params.\n */\n static decodeDeactivate(\n instruction: TransactionInstruction,\n ): DeactivateStakeParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n decodeData(STAKE_INSTRUCTION_LAYOUTS.Deactivate, instruction.data);\n\n return {\n stakePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(StakeProgram.programId)) {\n throw new Error('invalid instruction; programId is not StakeProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid StakeInstructionType's\n */\nexport type StakeInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof StakeInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'Deactivate'\n | 'Delegate'\n | 'Initialize'\n | 'Merge'\n | 'Split'\n | 'Withdraw';\n\ntype StakeInstructionInputData = {\n Authorize: IInstructionInputData &\n Readonly<{\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n AuthorizeWithSeed: IInstructionInputData &\n Readonly<{\n authorityOwner: Uint8Array;\n authoritySeed: string;\n instruction: number;\n newAuthorized: Uint8Array;\n stakeAuthorizationType: number;\n }>;\n Deactivate: IInstructionInputData;\n Delegate: IInstructionInputData;\n Initialize: IInstructionInputData &\n Readonly<{\n authorized: AuthorizedRaw;\n lockup: LockupRaw;\n }>;\n Merge: IInstructionInputData;\n Split: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n Withdraw: IInstructionInputData &\n Readonly<{\n lamports: number;\n }>;\n};\n\n/**\n * An enumeration of valid stake InstructionType's\n * @internal\n */\nexport const STAKE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in StakeInstructionType]: InstructionType<\n StakeInstructionInputData[Instruction]\n >;\n}>({\n Initialize: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.authorized(),\n Layout.lockup(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n ]),\n },\n Delegate: {\n index: 2,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Split: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Withdraw: {\n index: 4,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n Deactivate: {\n index: 5,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n Merge: {\n index: 7,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n ]),\n },\n AuthorizeWithSeed: {\n index: 8,\n layout: BufferLayout.struct(\n [\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('stakeAuthorizationType'),\n Layout.rustString('authoritySeed'),\n Layout.publicKey('authorityOwner'),\n ],\n ),\n },\n});\n\n/**\n * Stake authorization type\n */\nexport type StakeAuthorizationType = {\n /** The Stake Authorization index (from solana-stake-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid StakeAuthorizationLayout's\n */\nexport const StakeAuthorizationLayout = Object.freeze({\n Staker: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Stake program\n */\nexport class StakeProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Stake program\n */\n static programId: PublicKey = new PublicKey(\n 'Stake11111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Stake account\n *\n * This is generated from the solana-stake-program StakeState struct as\n * `StakeStateV2::size_of()`:\n * https://docs.rs/solana-stake-program/latest/solana_stake_program/stake_state/enum.StakeStateV2.html\n */\n static space: number = 200;\n\n /**\n * Generate an Initialize instruction to add to a Stake Create transaction\n */\n static initialize(params: InitializeStakeParams): TransactionInstruction {\n const {stakePubkey, authorized, lockup: maybeLockup} = params;\n const lockup: Lockup = maybeLockup || Lockup.default;\n const type = STAKE_INSTRUCTION_LAYOUTS.Initialize;\n const data = encodeData(type, {\n authorized: {\n staker: toBuffer(authorized.staker.toBuffer()),\n withdrawer: toBuffer(authorized.withdrawer.toBuffer()),\n },\n lockup: {\n unixTimestamp: lockup.unixTimestamp,\n epoch: lockup.epoch,\n custodian: toBuffer(lockup.custodian.toBuffer()),\n },\n });\n const instructionData = {\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a Transaction that creates a new Stake account at\n * an address generated with `from`, a seed, and the Stake programId\n */\n static createAccountWithSeed(\n params: CreateStakeAccountWithSeedParams,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccountWithSeed({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n basePubkey: params.basePubkey,\n seed: params.seed,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that creates a new Stake account\n */\n static createAccount(params: CreateStakeAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.stakePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n const {stakePubkey, authorized, lockup} = params;\n return transaction.add(this.initialize({stakePubkey, authorized, lockup}));\n }\n\n /**\n * Generate a Transaction that delegates Stake tokens to a validator\n * Vote PublicKey. This transaction can also be used to redelegate Stake\n * to a new validator Vote PublicKey.\n */\n static delegate(params: DelegateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, votePubkey} = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Delegate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: votePubkey, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: STAKE_CONFIG_ID, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorize(params: AuthorizeStakeParams): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that authorizes a new PublicKey as Staker\n * or Withdrawer on the Stake account.\n */\n static authorizeWithSeed(params: AuthorizeWithSeedStakeParams): Transaction {\n const {\n stakePubkey,\n authorityBase,\n authoritySeed,\n authorityOwner,\n newAuthorizedPubkey,\n stakeAuthorizationType,\n custodianPubkey,\n } = params;\n\n const type = STAKE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n stakeAuthorizationType: stakeAuthorizationType.index,\n authoritySeed: authoritySeed,\n authorityOwner: toBuffer(authorityOwner.toBuffer()),\n });\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorityBase, isSigner: true, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * @internal\n */\n static splitInstruction(params: SplitStakeParams): TransactionInstruction {\n const {stakePubkey, authorizedPubkey, splitStakePubkey, lamports} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Split;\n const data = encodeData(type, {lamports});\n return new TransactionInstruction({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: splitStakePubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another stake account\n */\n static split(\n params: SplitStakeParams,\n // Compute the cost of allocating the new stake account in lamports\n rentExemptReserve: number,\n ): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.authorizedPubkey,\n newAccountPubkey: params.splitStakePubkey,\n lamports: rentExemptReserve,\n space: this.space,\n programId: this.programId,\n }),\n );\n return transaction.add(this.splitInstruction(params));\n }\n\n /**\n * Generate a Transaction that splits Stake tokens into another account\n * derived from a base public key and seed\n */\n static splitWithSeed(\n params: SplitStakeWithSeedParams,\n // If this stake account is new, compute the cost of allocating it in lamports\n rentExemptReserve?: number,\n ): Transaction {\n const {\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n basePubkey,\n seed,\n lamports,\n } = params;\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.allocate({\n accountPubkey: splitStakePubkey,\n basePubkey,\n seed,\n space: this.space,\n programId: this.programId,\n }),\n );\n if (rentExemptReserve && rentExemptReserve > 0) {\n transaction.add(\n SystemProgram.transfer({\n fromPubkey: params.authorizedPubkey,\n toPubkey: splitStakePubkey,\n lamports: rentExemptReserve,\n }),\n );\n }\n return transaction.add(\n this.splitInstruction({\n stakePubkey,\n authorizedPubkey,\n splitStakePubkey,\n lamports,\n }),\n );\n }\n\n /**\n * Generate a Transaction that merges Stake accounts.\n */\n static merge(params: MergeStakeParams): Transaction {\n const {stakePubkey, sourceStakePubKey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Merge;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: sourceStakePubKey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that withdraws deactivated Stake tokens.\n */\n static withdraw(params: WithdrawStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey, toPubkey, lamports, custodianPubkey} =\n params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: SYSVAR_STAKE_HISTORY_PUBKEY,\n isSigner: false,\n isWritable: false,\n },\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n if (custodianPubkey) {\n keys.push({\n pubkey: custodianPubkey,\n isSigner: true,\n isWritable: false,\n });\n }\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a Transaction that deactivates Stake tokens.\n */\n static deactivate(params: DeactivateStakeParams): Transaction {\n const {stakePubkey, authorizedPubkey} = params;\n const type = STAKE_INSTRUCTION_LAYOUTS.Deactivate;\n const data = encodeData(type);\n\n return new Transaction().add({\n keys: [\n {pubkey: stakePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n });\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\n\nimport {\n encodeData,\n decodeData,\n InstructionType,\n IInstructionInputData,\n} from '../instruction';\nimport * as Layout from '../layout';\nimport {PublicKey} from '../publickey';\nimport {SystemProgram} from './system';\nimport {SYSVAR_CLOCK_PUBKEY, SYSVAR_RENT_PUBKEY} from '../sysvar';\nimport {Transaction, TransactionInstruction} from '../transaction';\nimport {toBuffer} from '../utils/to-buffer';\n\n/**\n * Vote account info\n */\nexport class VoteInit {\n nodePubkey: PublicKey;\n authorizedVoter: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number; /** [0, 100] */\n\n constructor(\n nodePubkey: PublicKey,\n authorizedVoter: PublicKey,\n authorizedWithdrawer: PublicKey,\n commission: number,\n ) {\n this.nodePubkey = nodePubkey;\n this.authorizedVoter = authorizedVoter;\n this.authorizedWithdrawer = authorizedWithdrawer;\n this.commission = commission;\n }\n}\n\n/**\n * Create vote account transaction params\n */\nexport type CreateVoteAccountParams = {\n fromPubkey: PublicKey;\n votePubkey: PublicKey;\n voteInit: VoteInit;\n lamports: number;\n};\n\n/**\n * InitializeAccount instruction params\n */\nexport type InitializeAccountParams = {\n votePubkey: PublicKey;\n nodePubkey: PublicKey;\n voteInit: VoteInit;\n};\n\n/**\n * Authorize instruction params\n */\nexport type AuthorizeVoteParams = {\n votePubkey: PublicKey;\n /** Current vote or withdraw authority, depending on `voteAuthorizationType` */\n authorizedPubkey: PublicKey;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n};\n\n/**\n * AuthorizeWithSeed instruction params\n */\nexport type AuthorizeVoteWithSeedParams = {\n currentAuthorityDerivedKeyBasePubkey: PublicKey;\n currentAuthorityDerivedKeyOwnerPubkey: PublicKey;\n currentAuthorityDerivedKeySeed: string;\n newAuthorizedPubkey: PublicKey;\n voteAuthorizationType: VoteAuthorizationType;\n votePubkey: PublicKey;\n};\n\n/**\n * Withdraw from vote account transaction params\n */\nexport type WithdrawFromVoteAccountParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n lamports: number;\n toPubkey: PublicKey;\n};\n\n/**\n * Update validator identity (node pubkey) vote account instruction params.\n */\nexport type UpdateValidatorIdentityParams = {\n votePubkey: PublicKey;\n authorizedWithdrawerPubkey: PublicKey;\n nodePubkey: PublicKey;\n};\n\n/**\n * Vote Instruction class\n */\nexport class VoteInstruction {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Decode a vote instruction and retrieve the instruction type.\n */\n static decodeInstructionType(\n instruction: TransactionInstruction,\n ): VoteInstructionType {\n this.checkProgramId(instruction.programId);\n\n const instructionTypeLayout = BufferLayout.u32('instruction');\n const typeIndex = instructionTypeLayout.decode(instruction.data);\n\n let type: VoteInstructionType | undefined;\n for (const [ixType, layout] of Object.entries(VOTE_INSTRUCTION_LAYOUTS)) {\n if (layout.index == typeIndex) {\n type = ixType as VoteInstructionType;\n break;\n }\n }\n\n if (!type) {\n throw new Error('Instruction type incorrect; not a VoteInstruction');\n }\n\n return type;\n }\n\n /**\n * Decode an initialize vote instruction and retrieve the instruction params.\n */\n static decodeInitializeAccount(\n instruction: TransactionInstruction,\n ): InitializeAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 4);\n\n const {voteInit} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.InitializeAccount,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n nodePubkey: instruction.keys[3].pubkey,\n voteInit: new VoteInit(\n new PublicKey(voteInit.nodePubkey),\n new PublicKey(voteInit.authorizedVoter),\n new PublicKey(voteInit.authorizedWithdrawer),\n voteInit.commission,\n ),\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorize(\n instruction: TransactionInstruction,\n ): AuthorizeVoteParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {newAuthorized, voteAuthorizationType} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Authorize,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedPubkey: instruction.keys[2].pubkey,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n };\n }\n\n /**\n * Decode an authorize instruction and retrieve the instruction params.\n */\n static decodeAuthorizeWithSeed(\n instruction: TransactionInstruction,\n ): AuthorizeVoteWithSeedParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorized,\n voteAuthorizationType,\n },\n } = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed,\n instruction.data,\n );\n\n return {\n currentAuthorityDerivedKeyBasePubkey: instruction.keys[2].pubkey,\n currentAuthorityDerivedKeyOwnerPubkey: new PublicKey(\n currentAuthorityDerivedKeyOwnerPubkey,\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey: new PublicKey(newAuthorized),\n voteAuthorizationType: {\n index: voteAuthorizationType,\n },\n votePubkey: instruction.keys[0].pubkey,\n };\n }\n\n /**\n * Decode a withdraw instruction and retrieve the instruction params.\n */\n static decodeWithdraw(\n instruction: TransactionInstruction,\n ): WithdrawFromVoteAccountParams {\n this.checkProgramId(instruction.programId);\n this.checkKeyLength(instruction.keys, 3);\n\n const {lamports} = decodeData(\n VOTE_INSTRUCTION_LAYOUTS.Withdraw,\n instruction.data,\n );\n\n return {\n votePubkey: instruction.keys[0].pubkey,\n authorizedWithdrawerPubkey: instruction.keys[2].pubkey,\n lamports,\n toPubkey: instruction.keys[1].pubkey,\n };\n }\n\n /**\n * @internal\n */\n static checkProgramId(programId: PublicKey) {\n if (!programId.equals(VoteProgram.programId)) {\n throw new Error('invalid instruction; programId is not VoteProgram');\n }\n }\n\n /**\n * @internal\n */\n static checkKeyLength(keys: Array, expectedLength: number) {\n if (keys.length < expectedLength) {\n throw new Error(\n `invalid instruction; found ${keys.length} keys, expected at least ${expectedLength}`,\n );\n }\n }\n}\n\n/**\n * An enumeration of valid VoteInstructionType's\n */\nexport type VoteInstructionType =\n // FIXME\n // It would be preferable for this type to be `keyof VoteInstructionInputData`\n // but Typedoc does not transpile `keyof` expressions.\n // See https://github.com/TypeStrong/typedoc/issues/1894\n | 'Authorize'\n | 'AuthorizeWithSeed'\n | 'InitializeAccount'\n | 'Withdraw'\n | 'UpdateValidatorIdentity';\n\n/** @internal */\nexport type VoteAuthorizeWithSeedArgs = Readonly<{\n currentAuthorityDerivedKeyOwnerPubkey: Uint8Array;\n currentAuthorityDerivedKeySeed: string;\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n}>;\ntype VoteInstructionInputData = {\n Authorize: IInstructionInputData & {\n newAuthorized: Uint8Array;\n voteAuthorizationType: number;\n };\n AuthorizeWithSeed: IInstructionInputData & {\n voteAuthorizeWithSeedArgs: VoteAuthorizeWithSeedArgs;\n };\n InitializeAccount: IInstructionInputData & {\n voteInit: Readonly<{\n authorizedVoter: Uint8Array;\n authorizedWithdrawer: Uint8Array;\n commission: number;\n nodePubkey: Uint8Array;\n }>;\n };\n Withdraw: IInstructionInputData & {\n lamports: number;\n };\n UpdateValidatorIdentity: IInstructionInputData;\n};\n\nconst VOTE_INSTRUCTION_LAYOUTS = Object.freeze<{\n [Instruction in VoteInstructionType]: InstructionType<\n VoteInstructionInputData[Instruction]\n >;\n}>({\n InitializeAccount: {\n index: 0,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteInit(),\n ]),\n },\n Authorize: {\n index: 1,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.publicKey('newAuthorized'),\n BufferLayout.u32('voteAuthorizationType'),\n ]),\n },\n Withdraw: {\n index: 3,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n BufferLayout.ns64('lamports'),\n ]),\n },\n UpdateValidatorIdentity: {\n index: 4,\n layout: BufferLayout.struct<\n VoteInstructionInputData['UpdateValidatorIdentity']\n >([BufferLayout.u32('instruction')]),\n },\n AuthorizeWithSeed: {\n index: 10,\n layout: BufferLayout.struct([\n BufferLayout.u32('instruction'),\n Layout.voteAuthorizeWithSeedArgs(),\n ]),\n },\n});\n\n/**\n * VoteAuthorize type\n */\nexport type VoteAuthorizationType = {\n /** The VoteAuthorize index (from solana-vote-program) */\n index: number;\n};\n\n/**\n * An enumeration of valid VoteAuthorization layouts.\n */\nexport const VoteAuthorizationLayout = Object.freeze({\n Voter: {\n index: 0,\n },\n Withdrawer: {\n index: 1,\n },\n});\n\n/**\n * Factory class for transactions to interact with the Vote program\n */\nexport class VoteProgram {\n /**\n * @internal\n */\n constructor() {}\n\n /**\n * Public key that identifies the Vote program\n */\n static programId: PublicKey = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n );\n\n /**\n * Max space of a Vote account\n *\n * This is generated from the solana-vote-program VoteState struct as\n * `VoteState::size_of()`:\n * https://docs.rs/solana-vote-program/1.9.5/solana_vote_program/vote_state/struct.VoteState.html#method.size_of\n *\n * KEEP IN SYNC WITH `VoteState::size_of()` in https://github.com/solana-labs/solana/blob/a474cb24b9238f5edcc982f65c0b37d4a1046f7e/sdk/program/src/vote/state/mod.rs#L340-L342\n */\n static space: number = 3762;\n\n /**\n * Generate an Initialize instruction.\n */\n static initializeAccount(\n params: InitializeAccountParams,\n ): TransactionInstruction {\n const {votePubkey, nodePubkey, voteInit} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.InitializeAccount;\n const data = encodeData(type, {\n voteInit: {\n nodePubkey: toBuffer(voteInit.nodePubkey.toBuffer()),\n authorizedVoter: toBuffer(voteInit.authorizedVoter.toBuffer()),\n authorizedWithdrawer: toBuffer(\n voteInit.authorizedWithdrawer.toBuffer(),\n ),\n commission: voteInit.commission,\n },\n });\n const instructionData = {\n keys: [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n ],\n programId: this.programId,\n data,\n };\n return new TransactionInstruction(instructionData);\n }\n\n /**\n * Generate a transaction that creates a new Vote account.\n */\n static createAccount(params: CreateVoteAccountParams): Transaction {\n const transaction = new Transaction();\n transaction.add(\n SystemProgram.createAccount({\n fromPubkey: params.fromPubkey,\n newAccountPubkey: params.votePubkey,\n lamports: params.lamports,\n space: this.space,\n programId: this.programId,\n }),\n );\n\n return transaction.add(\n this.initializeAccount({\n votePubkey: params.votePubkey,\n nodePubkey: params.voteInit.nodePubkey,\n voteInit: params.voteInit,\n }),\n );\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account.\n */\n static authorize(params: AuthorizeVoteParams): Transaction {\n const {\n votePubkey,\n authorizedPubkey,\n newAuthorizedPubkey,\n voteAuthorizationType,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.Authorize;\n const data = encodeData(type, {\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {pubkey: authorizedPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction that authorizes a new Voter or Withdrawer on the Vote account\n * where the current Voter or Withdrawer authority is a derived key.\n */\n static authorizeWithSeed(params: AuthorizeVoteWithSeedParams): Transaction {\n const {\n currentAuthorityDerivedKeyBasePubkey,\n currentAuthorityDerivedKeyOwnerPubkey,\n currentAuthorityDerivedKeySeed,\n newAuthorizedPubkey,\n voteAuthorizationType,\n votePubkey,\n } = params;\n\n const type = VOTE_INSTRUCTION_LAYOUTS.AuthorizeWithSeed;\n const data = encodeData(type, {\n voteAuthorizeWithSeedArgs: {\n currentAuthorityDerivedKeyOwnerPubkey: toBuffer(\n currentAuthorityDerivedKeyOwnerPubkey.toBuffer(),\n ),\n currentAuthorityDerivedKeySeed: currentAuthorityDerivedKeySeed,\n newAuthorized: toBuffer(newAuthorizedPubkey.toBuffer()),\n voteAuthorizationType: voteAuthorizationType.index,\n },\n });\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false},\n {\n pubkey: currentAuthorityDerivedKeyBasePubkey,\n isSigner: true,\n isWritable: false,\n },\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw from a Vote account.\n */\n static withdraw(params: WithdrawFromVoteAccountParams): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, lamports, toPubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.Withdraw;\n const data = encodeData(type, {lamports});\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: toPubkey, isSigner: false, isWritable: true},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n\n /**\n * Generate a transaction to withdraw safely from a Vote account.\n *\n * This function was created as a safeguard for vote accounts running validators, `safeWithdraw`\n * checks that the withdraw amount will not exceed the specified balance while leaving enough left\n * to cover rent. If you wish to close the vote account by withdrawing the full amount, call the\n * `withdraw` method directly.\n */\n static safeWithdraw(\n params: WithdrawFromVoteAccountParams,\n currentVoteAccountBalance: number,\n rentExemptMinimum: number,\n ): Transaction {\n if (params.lamports > currentVoteAccountBalance - rentExemptMinimum) {\n throw new Error(\n 'Withdraw will leave vote account with insufficient funds.',\n );\n }\n return VoteProgram.withdraw(params);\n }\n\n /**\n * Generate a transaction to update the validator identity (node pubkey) of a Vote account.\n */\n static updateValidatorIdentity(\n params: UpdateValidatorIdentityParams,\n ): Transaction {\n const {votePubkey, authorizedWithdrawerPubkey, nodePubkey} = params;\n const type = VOTE_INSTRUCTION_LAYOUTS.UpdateValidatorIdentity;\n const data = encodeData(type);\n\n const keys = [\n {pubkey: votePubkey, isSigner: false, isWritable: true},\n {pubkey: nodePubkey, isSigner: true, isWritable: false},\n {pubkey: authorizedWithdrawerPubkey, isSigner: true, isWritable: false},\n ];\n\n return new Transaction().add({\n keys,\n programId: this.programId,\n data,\n });\n }\n}\n","import {Buffer} from 'buffer';\nimport {\n assert as assertType,\n optional,\n string,\n type as pick,\n} from 'superstruct';\n\nimport * as Layout from './layout';\nimport * as shortvec from './utils/shortvec-encoding';\nimport {PublicKey, PUBLIC_KEY_LENGTH} from './publickey';\nimport {guardedShift, guardedSplice} from './utils/guarded-array-utils';\n\nexport const VALIDATOR_INFO_KEY = new PublicKey(\n 'Va1idator1nfo111111111111111111111111111111',\n);\n\n/**\n * @internal\n */\ntype ConfigKey = {\n publicKey: PublicKey;\n isSigner: boolean;\n};\n\n/**\n * Info used to identity validators.\n */\nexport type Info = {\n /** validator name */\n name: string;\n /** optional, validator website */\n website?: string;\n /** optional, extra information the validator chose to share */\n details?: string;\n /** optional, validator logo URL */\n iconUrl?: string;\n /** optional, used to identify validators on keybase.io */\n keybaseUsername?: string;\n};\n\nconst InfoString = pick({\n name: string(),\n website: optional(string()),\n details: optional(string()),\n iconUrl: optional(string()),\n keybaseUsername: optional(string()),\n});\n\n/**\n * ValidatorInfo class\n */\nexport class ValidatorInfo {\n /**\n * validator public key\n */\n key: PublicKey;\n /**\n * validator information\n */\n info: Info;\n\n /**\n * Construct a valid ValidatorInfo\n *\n * @param key validator public key\n * @param info validator information\n */\n constructor(key: PublicKey, info: Info) {\n this.key = key;\n this.info = info;\n }\n\n /**\n * Deserialize ValidatorInfo from the config account data. Exactly two config\n * keys are required in the data.\n *\n * @param buffer config account data\n * @return null if info was not found\n */\n static fromConfigData(\n buffer: Buffer | Uint8Array | Array,\n ): ValidatorInfo | null {\n let byteArray = [...buffer];\n const configKeyCount = shortvec.decodeLength(byteArray);\n if (configKeyCount !== 2) return null;\n\n const configKeys: Array = [];\n for (let i = 0; i < 2; i++) {\n const publicKey = new PublicKey(\n guardedSplice(byteArray, 0, PUBLIC_KEY_LENGTH),\n );\n const isSigner = guardedShift(byteArray) === 1;\n configKeys.push({publicKey, isSigner});\n }\n\n if (configKeys[0].publicKey.equals(VALIDATOR_INFO_KEY)) {\n if (configKeys[1].isSigner) {\n const rawInfo: any = Layout.rustString().decode(Buffer.from(byteArray));\n const info = JSON.parse(rawInfo as string);\n assertType(info, InfoString);\n return new ValidatorInfo(configKeys[1].publicKey, info);\n }\n }\n\n return null;\n }\n}\n","import * as BufferLayout from '@solana/buffer-layout';\nimport type {Buffer} from 'buffer';\n\nimport * as Layout from './layout';\nimport {PublicKey} from './publickey';\nimport {toBuffer} from './utils/to-buffer';\n\nexport const VOTE_PROGRAM_ID = new PublicKey(\n 'Vote111111111111111111111111111111111111111',\n);\n\nexport type Lockout = {\n slot: number;\n confirmationCount: number;\n};\n\n/**\n * History of how many credits earned by the end of each epoch\n */\nexport type EpochCredits = Readonly<{\n epoch: number;\n credits: number;\n prevCredits: number;\n}>;\n\nexport type AuthorizedVoter = Readonly<{\n epoch: number;\n authorizedVoter: PublicKey;\n}>;\n\ntype AuthorizedVoterRaw = Readonly<{\n authorizedVoter: Uint8Array;\n epoch: number;\n}>;\n\ntype PriorVoters = Readonly<{\n buf: PriorVoterRaw[];\n idx: number;\n isEmpty: number;\n}>;\n\nexport type PriorVoter = Readonly<{\n authorizedPubkey: PublicKey;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\ntype PriorVoterRaw = Readonly<{\n authorizedPubkey: Uint8Array;\n epochOfLastAuthorizedSwitch: number;\n targetEpoch: number;\n}>;\n\nexport type BlockTimestamp = Readonly<{\n slot: number;\n timestamp: number;\n}>;\n\ntype VoteAccountData = Readonly<{\n authorizedVoters: AuthorizedVoterRaw[];\n authorizedWithdrawer: Uint8Array;\n commission: number;\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n nodePubkey: Uint8Array;\n priorVoters: PriorVoters;\n rootSlot: number;\n rootSlotValid: number;\n votes: Lockout[];\n}>;\n\n/**\n * See https://github.com/solana-labs/solana/blob/8a12ed029cfa38d4a45400916c2463fb82bbec8c/programs/vote_api/src/vote_state.rs#L68-L88\n *\n * @internal\n */\nconst VoteAccountLayout = BufferLayout.struct([\n Layout.publicKey('nodePubkey'),\n Layout.publicKey('authorizedWithdrawer'),\n BufferLayout.u8('commission'),\n BufferLayout.nu64(), // votes.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('slot'),\n BufferLayout.u32('confirmationCount'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'votes',\n ),\n BufferLayout.u8('rootSlotValid'),\n BufferLayout.nu64('rootSlot'),\n BufferLayout.nu64(), // authorizedVoters.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n Layout.publicKey('authorizedVoter'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'authorizedVoters',\n ),\n BufferLayout.struct(\n [\n BufferLayout.seq(\n BufferLayout.struct([\n Layout.publicKey('authorizedPubkey'),\n BufferLayout.nu64('epochOfLastAuthorizedSwitch'),\n BufferLayout.nu64('targetEpoch'),\n ]),\n 32,\n 'buf',\n ),\n BufferLayout.nu64('idx'),\n BufferLayout.u8('isEmpty'),\n ],\n 'priorVoters',\n ),\n BufferLayout.nu64(), // epochCredits.length\n BufferLayout.seq(\n BufferLayout.struct([\n BufferLayout.nu64('epoch'),\n BufferLayout.nu64('credits'),\n BufferLayout.nu64('prevCredits'),\n ]),\n BufferLayout.offset(BufferLayout.u32(), -8),\n 'epochCredits',\n ),\n BufferLayout.struct(\n [BufferLayout.nu64('slot'), BufferLayout.nu64('timestamp')],\n 'lastTimestamp',\n ),\n]);\n\ntype VoteAccountArgs = {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n};\n\n/**\n * VoteAccount class\n */\nexport class VoteAccount {\n nodePubkey: PublicKey;\n authorizedWithdrawer: PublicKey;\n commission: number;\n rootSlot: number | null;\n votes: Lockout[];\n authorizedVoters: AuthorizedVoter[];\n priorVoters: PriorVoter[];\n epochCredits: EpochCredits[];\n lastTimestamp: BlockTimestamp;\n\n /**\n * @internal\n */\n constructor(args: VoteAccountArgs) {\n this.nodePubkey = args.nodePubkey;\n this.authorizedWithdrawer = args.authorizedWithdrawer;\n this.commission = args.commission;\n this.rootSlot = args.rootSlot;\n this.votes = args.votes;\n this.authorizedVoters = args.authorizedVoters;\n this.priorVoters = args.priorVoters;\n this.epochCredits = args.epochCredits;\n this.lastTimestamp = args.lastTimestamp;\n }\n\n /**\n * Deserialize VoteAccount from the account data.\n *\n * @param buffer account data\n * @return VoteAccount\n */\n static fromAccountData(\n buffer: Buffer | Uint8Array | Array,\n ): VoteAccount {\n const versionOffset = 4;\n const va = VoteAccountLayout.decode(toBuffer(buffer), versionOffset);\n\n let rootSlot: number | null = va.rootSlot;\n if (!va.rootSlotValid) {\n rootSlot = null;\n }\n\n return new VoteAccount({\n nodePubkey: new PublicKey(va.nodePubkey),\n authorizedWithdrawer: new PublicKey(va.authorizedWithdrawer),\n commission: va.commission,\n votes: va.votes,\n rootSlot,\n authorizedVoters: va.authorizedVoters.map(parseAuthorizedVoter),\n priorVoters: getPriorVoters(va.priorVoters),\n epochCredits: va.epochCredits,\n lastTimestamp: va.lastTimestamp,\n });\n }\n}\n\nfunction parseAuthorizedVoter({\n authorizedVoter,\n epoch,\n}: AuthorizedVoterRaw): AuthorizedVoter {\n return {\n epoch,\n authorizedVoter: new PublicKey(authorizedVoter),\n };\n}\n\nfunction parsePriorVoters({\n authorizedPubkey,\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n}: PriorVoterRaw): PriorVoter {\n return {\n authorizedPubkey: new PublicKey(authorizedPubkey),\n epochOfLastAuthorizedSwitch,\n targetEpoch,\n };\n}\n\nfunction getPriorVoters({buf, idx, isEmpty}: PriorVoters): PriorVoter[] {\n if (isEmpty) {\n return [];\n }\n\n return [\n ...buf.slice(idx + 1).map(parsePriorVoters),\n ...buf.slice(0, idx).map(parsePriorVoters),\n ];\n}\n","const endpoint = {\n http: {\n devnet: 'http://api.devnet.solana.com',\n testnet: 'http://api.testnet.solana.com',\n 'mainnet-beta': 'http://api.mainnet-beta.solana.com/',\n },\n https: {\n devnet: 'https://api.devnet.solana.com',\n testnet: 'https://api.testnet.solana.com',\n 'mainnet-beta': 'https://api.mainnet-beta.solana.com/',\n },\n};\n\nexport type Cluster = 'devnet' | 'testnet' | 'mainnet-beta';\n\n/**\n * Retrieves the RPC API URL for the specified cluster\n * @param {Cluster} [cluster=\"devnet\"] - The cluster name of the RPC API URL to use. Possible options: 'devnet' | 'testnet' | 'mainnet-beta'\n * @param {boolean} [tls=\"http\"] - Use TLS when connecting to cluster.\n *\n * @returns {string} URL string of the RPC endpoint\n */\nexport function clusterApiUrl(cluster?: Cluster, tls?: boolean): string {\n const key = tls === false ? 'http' : 'https';\n\n if (!cluster) {\n return endpoint[key]['devnet'];\n }\n\n const url = endpoint[key][cluster];\n if (!url) {\n throw new Error(`Unknown ${key} cluster: ${cluster}`);\n }\n return url;\n}\n","import type {Buffer} from 'buffer';\n\nimport {\n BlockheightBasedTransactionConfirmationStrategy,\n Connection,\n DurableNonceTransactionConfirmationStrategy,\n TransactionConfirmationStrategy,\n} from '../connection';\nimport type {TransactionSignature} from '../transaction';\nimport type {ConfirmOptions} from '../connection';\nimport {SendTransactionError} from '../errors';\n\n/**\n * Send and confirm a raw transaction\n *\n * If `commitment` option is not specified, defaults to 'max' commitment.\n *\n * @param {Connection} connection\n * @param {Buffer} rawTransaction\n * @param {TransactionConfirmationStrategy} confirmationStrategy\n * @param {ConfirmOptions} [options]\n * @returns {Promise}\n */\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategy: TransactionConfirmationStrategy,\n options?: ConfirmOptions,\n): Promise;\n\n/**\n * @deprecated Calling `sendAndConfirmRawTransaction()` without a `confirmationStrategy`\n * is no longer supported and will be removed in a future version.\n */\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n options?: ConfirmOptions,\n): Promise;\n\n// eslint-disable-next-line no-redeclare\nexport async function sendAndConfirmRawTransaction(\n connection: Connection,\n rawTransaction: Buffer,\n confirmationStrategyOrConfirmOptions:\n | TransactionConfirmationStrategy\n | ConfirmOptions\n | undefined,\n maybeConfirmOptions?: ConfirmOptions,\n): Promise {\n let confirmationStrategy: TransactionConfirmationStrategy | undefined;\n let options: ConfirmOptions | undefined;\n if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'lastValidBlockHeight',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as BlockheightBasedTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else if (\n confirmationStrategyOrConfirmOptions &&\n Object.prototype.hasOwnProperty.call(\n confirmationStrategyOrConfirmOptions,\n 'nonceValue',\n )\n ) {\n confirmationStrategy =\n confirmationStrategyOrConfirmOptions as DurableNonceTransactionConfirmationStrategy;\n options = maybeConfirmOptions;\n } else {\n options = confirmationStrategyOrConfirmOptions as\n | ConfirmOptions\n | undefined;\n }\n const sendOptions = options && {\n skipPreflight: options.skipPreflight,\n preflightCommitment: options.preflightCommitment || options.commitment,\n minContextSlot: options.minContextSlot,\n };\n\n const signature = await connection.sendRawTransaction(\n rawTransaction,\n sendOptions,\n );\n\n const commitment = options && options.commitment;\n const confirmationPromise = confirmationStrategy\n ? connection.confirmTransaction(confirmationStrategy, commitment)\n : connection.confirmTransaction(signature, commitment);\n const status = (await confirmationPromise).value;\n\n if (status.err) {\n if (signature != null) {\n throw new SendTransactionError({\n action: sendOptions?.skipPreflight ? 'send' : 'simulate',\n signature: signature,\n transactionMessage: `Status: (${JSON.stringify(status)})`,\n });\n }\n throw new Error(\n `Raw transaction ${signature} failed (${JSON.stringify(status)})`,\n );\n }\n\n return signature;\n}\n","export * from './account';\nexport * from './blockhash';\nexport * from './bpf-loader-deprecated';\nexport * from './bpf-loader';\nexport * from './connection';\nexport * from './epoch-schedule';\nexport * from './errors';\nexport * from './fee-calculator';\nexport * from './keypair';\nexport * from './loader';\nexport * from './message';\nexport * from './nonce-account';\nexport * from './programs';\nexport * from './publickey';\nexport * from './transaction';\nexport * from './validator-info';\nexport * from './vote-account';\nexport * from './sysvar';\nexport * from './utils';\n\n/**\n * There are 1-billion lamports in one SOL\n */\nexport const LAMPORTS_PER_SOL = 1000000000;\n"],"names":["require$$0","require$$1","anumber","isBytes","abytes","aexists","aoutput","crypto","createView","rotr","utf8ToBytes","toBytes","concatBytes","wrapConstructor","setBigUint64","Chi","Maj","Hash","U32_MASK64","_32n","fromBig","split","rotlSH","rotlSL","rotlBH","rotlBL","u64","HashMD","_0n","_1n","_2n","_3n","_5n","_8n","validateOpts","ut.validateObject","ut.aInRange","ut.bytesToNumberLE","ut.numberToBytesLE","ut.bytesToHex","ut.concatBytes","generatePrivateKey","ed25519","utils","randomPrivateKey","generateKeypair","privateScalar","publicKey","getPublicKey","secretKey","Uint8Array","set","isOnCurve","ExtendedPoint","fromHex","sign","message","slice","verify","toBuffer","arr","Buffer","isBuffer","from","buffer","byteOffset","byteLength","this","bs58","SHA256_K","SHA256_IV","SHA256_W","sha256","SHA256","require$$2","Struct","constructor","properties","Object","assign","encode","serialize","SOLANA_SCHEMA","decode","data","deserialize","decodeUnchecked","deserializeUnchecked","Enum","enum","keys","length","Error","map","key","Map","MAX_SEED_LENGTH","PUBLIC_KEY_LENGTH","isPublicKeyData","value","_bn","undefined","uniquePublicKeyCounter","PublicKey","decoded","BN","unique","equals","eq","toBase58","toJSON","buf","b","toArrayLike","zeroPad","alloc","copy","Symbol","toStringTag","toString","createWithSeed","fromPublicKey","seed","programId","concat","publicKeyBytes","createProgramAddressSync","seeds","forEach","TypeError","createProgramAddress","findProgramAddressSync","nonce","address","seedsWithNonce","err","findProgramAddress","pubkeyData","pubkey","_PublicKey","default","kind","fields","Account","_publicKey","_secretKey","secretKeyBuffer","BPF_LOADER_DEPRECATED_PROGRAM_ID","Layout_1","Layout","PACKET_DATA_SIZE","VERSION_PREFIX_MASK","SIGNATURE_LENGTH_IN_BYTES","TransactionExpiredBlockheightExceededError","signature","defineProperty","prototype","TransactionExpiredTimeoutError","timeoutSeconds","toFixed","TransactionExpiredNonceInvalidError","MessageAccountKeys","staticAccountKeys","accountKeysFromLookups","keySegments","push","writable","readonly","get","index","keySegment","flat","compileInstructions","instructions","U8_MAX","keyIndexMap","findKeyIndex","keyIndex","instruction","programIdIndex","accountKeyIndexes","meta","property","BufferLayout","rustString","rsl","_decode","bind","_encode","rslShim","offset","str","chars","span","authorized","lockup","voteInit","voteAuthorizeWithSeedArgs","getAlloc","type","getItemAlloc","item","field","Array","isArray","elementLayout","layout","decodeLength","bytes","len","size","elem","shift","encodeLength","rem_len","condition","CompiledKeys","payer","keyMetaMap","compile","getOrInsertDefault","keyMeta","isSigner","isWritable","isInvoked","payerKeyMeta","ix","accountMeta","getMessageComponents","mapEntries","entries","assert","writableSigners","filter","readonlySigners","writableNonSigners","readonlyNonSigners","header","numRequiredSignatures","numReadonlySignedAccounts","numReadonlyUnsignedAccounts","payerAddress","extractTableLookup","lookupTable","writableIndexes","drainedWritableKeys","drainKeysFoundInLookupTable","state","addresses","readonlyIndexes","drainedReadonlyKeys","accountKey","lookupTableEntries","keyMetaFilter","lookupTableIndexes","drainedKeys","lookupTableIndex","findIndex","entry","delete","END_OF_BUFFER_ERROR_MESSAGE","guardedShift","byteArray","guardedSplice","args","start","splice","Message","accountKeys","recentBlockhash","indexToProgramIds","account","version","compiledInstructions","accounts","addressTableLookups","getAccountKeys","compiledKeys","payerKey","isAccountSigner","isAccountWritable","numSignedAccounts","unsignedAccountIndex","numUnsignedAccounts","numWritableUnsignedAccounts","numWritableSignedAccounts","isProgramId","has","programIds","values","nonProgramIds","_","numKeys","keyCount","shortvec","keyIndicesCount","dataCount","keyIndices","dataLength","instructionCount","instructionBuffer","instructionBufferLength","instructionLayout","signDataLayout","transaction","signData","accountCount","i","dataSlice","messageArgs","MessageV0","numAccountKeysFromLookups","count","lookup","addressLookupTableAccounts","resolveAddressTableLookups","numStaticAccountKeys","lookupAccountKeysIndex","numWritableLookupAccountKeys","reduce","tableLookup","tableAccount","find","lookupTableAccounts","extractResult","addressTableLookup","encodedStaticAccountKeysLength","serializedInstructions","serializeInstructions","encodedInstructionsLength","serializedAddressTableLookups","serializeAddressTableLookups","encodedAddressTableLookupsLength","messageLayout","serializedMessage","MESSAGE_VERSION_0_PREFIX","serializedMessageLength","prefix","staticAccountKeysLength","instructionsLength","addressTableLookupsLength","serializedLength","encodedAccountKeyIndexesLength","encodedDataLength","encodedWritableIndexesLength","encodedReadonlyIndexesLength","addressTableLookupLayout","maskedPrefix","accountKeyIndexesLength","addressTableLookupsCount","writableIndexesLength","readonlyIndexesLength","VersionedMessage","deserializeMessageVersion","TransactionStatus","DEFAULT_SIGNATURE","fill","TransactionInstruction","opts","Transaction","signatures","feePayer","lastValidBlockHeight","nonceInfo","minNonceContextSlot","_message","_json","hasOwnProperty","call","minContextSlot","blockhash","nonceInstruction","signers","add","items","compileMessage","JSON","stringify","console","warn","accountMetas","includes","uniqueMetas","pubkeyString","uniqueIndex","x","sort","y","options","localeMatcher","usage","sensitivity","ignorePunctuation","numeric","caseFirst","localeCompare","feePayerIndex","payerMeta","unshift","signedKeys","unsignedKeys","indexOf","invariant","_compile","valid","every","pair","serializeMessage","getEstimatedFee","connection","getFeeForMessage","setSigners","seen","Set","uniqueSigners","signer","_partialSign","partialSign","_addSignature","addSignature","sigpair","verifySignatures","requireAllSignatures","signatureErrors","_getMessageSignednessErrors","errors","missing","invalid","config","sigErrors","errorMessage","p","join","_serialize","signatureCount","transactionLength","wireTransaction","keyObj","populate","sigPubkeyPair","some","TransactionMessage","decompile","compiledIx","compileToLegacyMessage","compileToV0Message","VersionedTransaction","defaultSignatures","encodedSignaturesLength","transactionLayout","serializedTransaction","serializedTransactionLength","signaturesLength","messageData","signerPubkeys","signerIndex","NUM_TICKS_PER_SECOND","DEFAULT_TICKS_PER_SLOT","NUM_SLOTS_PER_SECOND","MS_PER_SLOT","SYSVAR_CLOCK_PUBKEY","SYSVAR_EPOCH_SCHEDULE_PUBKEY","SYSVAR_INSTRUCTIONS_PUBKEY","SYSVAR_RECENT_BLOCKHASHES_PUBKEY","SYSVAR_RENT_PUBKEY","SYSVAR_REWARDS_PUBKEY","SYSVAR_SLOT_HASHES_PUBKEY","SYSVAR_SLOT_HISTORY_PUBKEY","SYSVAR_STAKE_HISTORY_PUBKEY","SendTransactionError","action","transactionMessage","logs","maybeLogsOutput","guideText","a","transactionLogs","transactionError","cachedLogs","getLogs","Promise","resolve","reject","getTransaction","then","tx","logMessages","catch","SolanaJSONRPCErrorCode","JSON_RPC_SERVER_ERROR_BLOCK_CLEANED_UP","JSON_RPC_SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_BLOCK_NOT_AVAILABLE","JSON_RPC_SERVER_ERROR_NODE_UNHEALTHY","JSON_RPC_SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE","JSON_RPC_SERVER_ERROR_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_NO_SNAPSHOT","JSON_RPC_SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED","JSON_RPC_SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX","JSON_RPC_SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE","JSON_RPC_SCAN_ERROR","JSON_RPC_SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH","JSON_RPC_SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET","JSON_RPC_SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION","JSON_RPC_SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED","SolanaJSONRPCError","code","customMessage","name","sendAndConfirmTransaction","sendOptions","skipPreflight","preflightCommitment","commitment","maxRetries","sendTransaction","status","confirmTransaction","abortSignal","nonceAccountPubkey","nonceValue","sleep","ms","setTimeout","encodeData","allocLength","layoutFields","decodeData","FeeCalculatorLayout","NonceAccountLayout","NONCE_ACCOUNT_LENGTH","NonceAccount","authorizedPubkey","feeCalculator","fromAccountData","nonceAccount","blob","bigIntLayout","codec","getU64Codec","src","bigInt","SystemInstruction","decodeInstructionType","checkProgramId","instructionTypeLayout","typeIndex","ixType","SYSTEM_INSTRUCTION_LAYOUTS","decodeCreateAccount","checkKeyLength","lamports","space","Create","fromPubkey","newAccountPubkey","decodeTransfer","Transfer","toPubkey","decodeTransferWithSeed","TransferWithSeed","basePubkey","decodeAllocate","Allocate","accountPubkey","decodeAllocateWithSeed","base","AllocateWithSeed","decodeAssign","Assign","decodeAssignWithSeed","AssignWithSeed","decodeCreateWithSeed","CreateWithSeed","decodeNonceInitialize","InitializeNonceAccount","noncePubkey","decodeNonceAdvance","AdvanceNonceAccount","decodeNonceWithdraw","WithdrawNonceAccount","decodeNonceAuthorize","AuthorizeNonceAccount","newAuthorizedPubkey","SystemProgram","expectedLength","freeze","UpgradeNonceAccount","createAccount","params","transfer","BigInt","createAccountWithSeed","createNonceAccount","initParams","nonceInitialize","instructionData","nonceAdvance","nonceWithdraw","nonceAuthorize","allocate","CHUNK_SIZE","Loader","getMinNumSignatures","Math","ceil","chunkSize","load","program","balanceNeeded","getMinimumBalanceForRentExemption","programInfo","getAccountInfo","executable","error","owner","dataLayout","array","transactions","bytesLength","bytesLengthPadding","_rpcEndpoint","REQUESTS_PER_SECOND","all","deployCommitment","finalizeSignature","context","currentSlot","getSlot","slot","round","BPF_LOADER_PROGRAM_ID","BpfLoader","elf","loaderProgramId","fastStableStringify","validate","MINIMUM_SLOT_PER_EPOCH","trailingZeros","n","nextPowerOfTwo","EpochSchedule","slotsPerEpoch","leaderScheduleSlotOffset","warmup","firstNormalEpoch","firstNormalSlot","getEpoch","getEpochAndSlotIndex","epoch","epochLen","getSlotsInEpoch","slotIndex","normalSlotIndex","normalEpochIndex","floor","getFirstSlotInEpoch","pow","getLastSlotInEpoch","globalThis","fetch","RpcWebSocketClient","CommonClient","generate_request_id","webSocketFactory","url","rpc","createRpc","autoconnect","max_reconnects","reconnect","reconnect_interval","underlyingSocket","socket","readyState","notify","LOOKUP_TABLE_META_SIZE","AddressLookupTableAccount","isActive","U64_MAX","deactivationSlot","accountData","LookupTableMetaLayout","serializedAddressesLen","numSerializedAddresses","lastExtendedSlot","lastExtendedSlotStartIndex","lastExtendedStartIndex","authority","URL_RE","makeWebsocketUrl","endpoint","matches","match","hostish","portWithColon","rest","protocol","startsWith","startPort","parseInt","websocketPort","PublicKeyFromString","coerce","instance","string","RawAccountDataResult","tuple","literal","BufferFromRawAccountData","BLOCKHASH_CACHE_TIMEOUT_MS","assertEndpointUrl","putativeUrl","test","extractCommitmentFromConfig","commitmentOrConfig","specifiedCommitment","specifiedConfig","applyDefaultMemcmpEncodingToFilters","filters","memcmp","encoding","createRpcResult","result","union","pick","jsonrpc","id","unknown","optional","any","UnknownRpcResult","jsonRpcResult","schema","create","jsonRpcResultAndContext","number","notificationResultAndContext","versionedMessageFromResponse","response","GetInflationGovernorResult","foundation","foundationTerm","initial","taper","terminal","GetInflationRewardResult","nullable","effectiveSlot","amount","postBalance","commission","GetRecentPrioritizationFeesResult","prioritizationFee","GetInflationRateResult","total","validator","GetEpochInfoResult","slotsInEpoch","absoluteSlot","blockHeight","transactionCount","GetEpochScheduleResult","boolean","GetLeaderScheduleResult","record","TransactionErrorResult","SignatureStatusResult","SignatureReceivedResult","VersionResult","ParsedInstructionStruct","parsed","PartiallyDecodedInstructionStruct","SimulatedTransactionResponseStruct","rentEpoch","unitsConsumed","returnData","innerInstructions","BlockProductionResponseStruct","byIdentity","range","firstSlot","lastSlot","createRpcClient","httpHeaders","customFetch","fetchMiddleware","disableRetryOnRateLimit","httpAgent","fetchImpl","agent","fetchWithMiddleware","info","init","modifiedFetchArgs","modifiedInfo","modifiedInit","clientBrowser","RpcClient","request","callback","method","body","headers","COMMON_HTTP_HEADERS","too_many_requests_retries","res","waitTime","statusText","text","ok","createRpcRequest","client","createRpcBatchRequest","requests","batch","methodName","GetInflationGovernorRpcResult","GetInflationRateRpcResult","GetRecentPrioritizationFeesRpcResult","GetEpochInfoRpcResult","GetEpochScheduleRpcResult","GetLeaderScheduleRpcResult","SlotRpcResult","GetSupplyRpcResult","circulating","nonCirculating","nonCirculatingAccounts","TokenAmountResult","uiAmount","decimals","uiAmountString","GetTokenLargestAccountsResult","GetTokenAccountsByOwner","ParsedAccountDataResult","GetParsedTokenAccountsByOwner","GetLargestAccountsRpcResult","AccountInfoResult","KeyedAccountInfoResult","ParsedOrRawAccountData","ParsedAccountInfoResult","KeyedParsedAccountInfoResult","StakeActivationResult","active","inactive","GetConfirmedSignaturesForAddress2RpcResult","memo","blockTime","GetSignaturesForAddressRpcResult","AccountNotificationResult","subscription","ProgramAccountInfoResult","ProgramAccountNotificationResult","SlotInfoResult","parent","root","SlotNotificationResult","SlotUpdateResult","timestamp","stats","numTransactionEntries","numSuccessfulTransactions","numFailedTransactions","maxTransactionsPerEntry","SlotUpdateNotificationResult","SignatureNotificationResult","RootNotificationResult","ContactInfoResult","gossip","tpu","VoteAccountInfoResult","votePubkey","nodePubkey","activatedStake","epochVoteAccount","epochCredits","lastVote","rootSlot","GetVoteAccounts","current","delinquent","ConfirmationStatus","SignatureStatusResponse","confirmations","confirmationStatus","GetSignatureStatusesRpcResult","GetMinimumBalanceForRentExemptionRpcResult","AddressTableLookupStruct","ConfirmedTransactionResult","AnnotatedAccountKey","source","ConfirmedTransactionAccountsModeResult","ParsedInstructionResult","RawInstructionResult","InstructionResult","UnknownInstructionResult","ParsedOrRawInstruction","ParsedConfirmedTransactionResult","TokenBalanceResult","accountIndex","mint","uiTokenAmount","LoadedAddressesResult","ConfirmedTransactionMetaResult","fee","preBalances","postBalances","preTokenBalances","postTokenBalances","loadedAddresses","computeUnitsConsumed","costUnits","ParsedConfirmedTransactionMetaResult","TransactionVersionStruct","RewardsResult","rewardType","GetBlockRpcResult","previousBlockhash","parentSlot","rewards","GetNoneModeBlockRpcResult","GetAccountsModeBlockRpcResult","GetParsedBlockRpcResult","GetParsedAccountsModeBlockRpcResult","GetParsedNoneModeBlockRpcResult","GetConfirmedBlockRpcResult","GetBlockSignaturesRpcResult","GetTransactionRpcResult","GetParsedTransactionRpcResult","GetLatestBlockhashRpcResult","IsBlockhashValidRpcResult","PerfSampleResult","numTransactions","numSlots","samplePeriodSecs","GetRecentPerformanceSamplesRpcResult","GetFeeCalculatorRpcResult","lamportsPerSignature","RequestAirdropRpcResult","SendTransactionRpcResult","LogsResult","LogsNotificationResult","process","Connection","_commitment","_confirmTransactionInitialTimeout","_rpcWsEndpoint","_rpcClient","_rpcRequest","_rpcBatchRequest","_rpcWebSocket","_rpcWebSocketConnected","_rpcWebSocketHeartbeat","_rpcWebSocketIdleTimeout","_rpcWebSocketGeneration","_disableBlockhashCaching","_pollingBlockhash","_blockhashInfo","latestBlockhash","lastFetch","transactionSignatures","simulatedSignatures","_nextClientSubscriptionId","_subscriptionDisposeFunctionsByClientSubscriptionId","_subscriptionHashByClientSubscriptionId","_subscriptionStateChangeCallbacksByHash","_subscriptionCallbacksByServerSubscriptionId","_subscriptionsByHash","_subscriptionsAutoDisposedByRpc","getBlockHeight","requestPromises","_buildArgs","requestHash","unsafeRes","wsEndpoint","confirmTransactionInitialTimeout","Infinity","on","_wsOnOpen","_wsOnError","_wsOnClose","_wsOnAccountNotification","_wsOnProgramAccountNotification","_wsOnSlotNotification","_wsOnSlotUpdatesNotification","_wsOnSignatureNotification","_wsOnRootNotification","_wsOnLogsNotification","rpcEndpoint","getBalanceAndContext","getBalance","e","getBlockTime","getMinimumLedgerSlot","getFirstAvailableBlock","getSupply","configArg","getTokenSupply","tokenMintAddress","getTokenAccountBalance","tokenAddress","getTokenAccountsByOwner","ownerAddress","_args","getParsedTokenAccountsByOwner","getLargestAccounts","arg","getTokenLargestAccounts","mintAddress","getAccountInfoAndContext","getParsedAccountInfo","getMultipleParsedAccounts","publicKeys","rawConfig","getMultipleAccountsInfoAndContext","getMultipleAccountsInfo","getStakeActivation","getProgramAccounts","configOrCommitment","configWithoutEncoding","baseSchema","withContext","getParsedProgramAccounts","strategy","rawSignature","aborted","reason","decodedSignature","confirmTransactionUsingLegacyTimeoutStrategy","confirmTransactionUsingBlockHeightExceedanceStrategy","confirmTransactionUsingDurableNonceStrategy","getCancellationPromise","signal","addEventListener","getTransactionConfirmationPromise","signatureSubscriptionId","disposeSignatureSubscriptionStateChangeObserver","done","confirmationPromise","onSignature","__type","PROCESSED","subscriptionSetupPromise","resolveSubscriptionSetup","_onSubscriptionStateChange","nextState","getSignatureStatus","abortConfirmation","removeSignatureListener","expiryPromise","checkBlockHeight","_e","currentBlockHeight","BLOCKHEIGHT_EXCEEDED","cancellationPromise","outcome","race","currentNonceValue","lastCheckedSlot","getCurrentNonceValue","getNonceAndContext","NONCE_INVALID","slotInWhichNonceDidAdvance","signatureStatus","commitmentForStatus","timeoutId","timeoutMs","TIMED_OUT","clearTimeout","getClusterNodes","getVoteAccounts","getSlotLeader","getSlotLeaders","startSlot","limit","getSignatureStatuses","getTransactionCount","getTotalSupply","excludeNonCirculatingAccountsList","getInflationGovernor","getInflationReward","getInflationRate","getEpochInfo","getEpochSchedule","epochSchedule","getLeaderSchedule","getRecentBlockhashAndContext","getLatestBlockhashAndContext","getRecentPerformanceSamples","getFeeCalculatorForBlockhash","wireMessage","getRecentPrioritizationFees","lockedWritableAccounts","getRecentBlockhash","getLatestBlockhash","isBlockhashValid","getVersion","getGenesisHash","getBlock","_buildArgsAtLeastConfirmed","transactionDetails","getParsedBlock","getBlockProduction","extra","c","getParsedTransaction","getParsedTransactions","getTransactions","getConfirmedBlock","block","getBlocks","endSlot","getBlockSignatures","getConfirmedBlockSignatures","getConfirmedTransaction","getParsedConfirmedTransaction","getParsedConfirmedTransactions","getConfirmedSignaturesForAddress","firstAvailableBlock","until","highestConfirmedRoot","before","confirmedSignatureInfo","getConfirmedSignaturesForAddress2","getSignaturesForAddress","getAddressLookupTable","accountInfo","getNonce","requestAirdrop","to","_blockhashWithExpiryBlockHeight","disableCache","timeSinceFetch","Date","now","expired","_pollNewBlockhash","startTime","cachedLatestBlockhash","cachedBlockhash","getStakeMinimumDelegation","simulateTransaction","transactionOrMessage","configOrSigners","includeAccounts","versionedTx","encodedTransaction","originalTx","sigVerify","traceIndent","logTrace","signersOrOptions","sendRawTransaction","rawTransaction","sendEncodedTransaction","setInterval","_updateSubscriptions","Number","MAX_SAFE_INTEGER","clearInterval","hash","_setSubscription","nextSubscription","prevState","stateChangeCallbacks","cb","clientSubscriptionId","close","log","connect","activeWebSocketGeneration","isCurrentConnectionStillActive","callbacks","serverSubscriptionId","unsubscribeMethod","_handleServerNotification","callbackArgs","notification","_makeSubscription","subscriptionConfig","existingSubscription","onAccountChange","removeAccountChangeListener","_unsubscribeClientSubscription","accountId","onProgramAccountChange","maybeFilters","removeProgramAccountChangeListener","onLogs","mentions","removeOnLogsListener","onSlotChange","removeSlotChangeListener","onSlotUpdate","removeSlotUpdateListener","subscriptionName","dispose","override","_err","onSignatureWithOptions","onRootChange","removeRootChangeListener","Keypair","keypair","_keypair","generate","fromSecretKey","skipValidation","computedPublicKey","ii","fromSeed","LOOKUP_TABLE_INSTRUCTION_LAYOUTS","CreateLookupTable","bigintLayout","FreezeLookupTable","ExtendLookupTable","DeactivateLookupTable","CloseLookupTable","AddressLookupTableInstruction","layoutType","decodeCreateLookupTable","checkKeysLength","recentSlot","decodeExtendLookupTable","decodeCloseLookupTable","recipient","decodeFreezeLookupTable","decodeDeactivateLookupTable","AddressLookupTableProgram","createLookupTable","lookupTableAddress","bumpSeed","getU64Encoder","freezeLookupTable","extendLookupTable","addr","deactivateLookupTable","closeLookupTable","ComputeBudgetInstruction","COMPUTE_BUDGET_INSTRUCTION_LAYOUTS","decodeRequestUnits","units","additionalFee","RequestUnits","decodeRequestHeapFrame","RequestHeapFrame","decodeSetComputeUnitLimit","SetComputeUnitLimit","decodeSetComputeUnitPrice","microLamports","SetComputeUnitPrice","ComputeBudgetProgram","requestUnits","requestHeapFrame","setComputeUnitLimit","setComputeUnitPrice","PRIVATE_KEY_BYTES","PUBLIC_KEY_BYTES","SIGNATURE_BYTES","ED25519_INSTRUCTION_LAYOUT","Ed25519Program","createInstructionWithPublicKey","instructionIndex","publicKeyOffset","signatureOffset","messageDataOffset","numSignatures","padding","signatureInstructionIndex","publicKeyInstructionIndex","messageDataSize","messageInstructionIndex","createInstructionWithPrivateKey","privateKey","ut.numberToHexUnpadded","ut.abytes","mod.Field","ut.inRange","ut.isBytes","ut.bytesToNumberBE","mod.mod","mod.invert","ut.numberToBytesBE","ut.hexToBytes","mod.getMinHashLength","mod.mapHashToField","ut.bitMask","ut.createHmacDrbg","ecdsaSign","msgHash","privKey","secp256k1","toCompactRawBytes","recovery","isValidPrivateKey","publicKeyCreate","ETHEREUM_ADDRESS_BYTES","SIGNATURE_OFFSETS_SERIALIZED_SIZE","SECP256K1_INSTRUCTION_LAYOUT","Secp256k1Program","publicKeyToEthAddress","keccak_256","recoveryId","createInstructionWithEthAddress","ethAddress","rawAddress","substr","dataStart","ethAddressOffset","ethAddressInstructionIndex","pkey","messageHash","STAKE_CONFIG_ID","Authorized","staker","withdrawer","Lockup","unixTimestamp","custodian","_Lockup","StakeInstruction","STAKE_INSTRUCTION_LAYOUTS","decodeInitialize","Initialize","stakePubkey","decodeDelegate","Delegate","decodeAuthorize","newAuthorized","stakeAuthorizationType","Authorize","o","custodianPubkey","decodeAuthorizeWithSeed","authoritySeed","authorityOwner","AuthorizeWithSeed","authorityBase","decodeSplit","Split","splitStakePubkey","decodeMerge","Merge","sourceStakePubKey","decodeWithdraw","Withdraw","decodeDeactivate","Deactivate","StakeProgram","StakeAuthorizationLayout","Staker","Withdrawer","initialize","maybeLockup","delegate","authorize","authorizeWithSeed","splitInstruction","rentExemptReserve","splitWithSeed","merge","withdraw","deactivate","VoteInit","authorizedVoter","authorizedWithdrawer","VoteInstruction","VOTE_INSTRUCTION_LAYOUTS","decodeInitializeAccount","InitializeAccount","voteAuthorizationType","currentAuthorityDerivedKeyOwnerPubkey","currentAuthorityDerivedKeySeed","currentAuthorityDerivedKeyBasePubkey","authorizedWithdrawerPubkey","VoteProgram","UpdateValidatorIdentity","VoteAuthorizationLayout","Voter","initializeAccount","safeWithdraw","currentVoteAccountBalance","rentExemptMinimum","updateValidatorIdentity","VALIDATOR_INFO_KEY","InfoString","website","details","iconUrl","keybaseUsername","ValidatorInfo","fromConfigData","configKeyCount","configKeys","rawInfo","parse","assertType","VOTE_PROGRAM_ID","VoteAccountLayout","VoteAccount","votes","authorizedVoters","priorVoters","lastTimestamp","versionOffset","va","rootSlotValid","parseAuthorizedVoter","getPriorVoters","parsePriorVoters","epochOfLastAuthorizedSwitch","targetEpoch","idx","isEmpty","http","devnet","testnet","https","clusterApiUrl","cluster","tls","sendAndConfirmRawTransaction","confirmationStrategyOrConfirmOptions","maybeConfirmOptions","confirmationStrategy","LAMPORTS_PER_SOL"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEA,CAAA,QAAA,CAAA,UAAkB,GAAG;CACrB,CAAA,QAAA,CAAA,WAAmB,GAAG;CACtB,CAAA,QAAA,CAAA,aAAqB,GAAG;;EAExB,IAAI,MAAM,GAAG;EACb,IAAI,SAAS,GAAG;EAChB,IAAI,GAAG,GAAG,OAAO,UAAU,KAAK,WAAW,GAAG,UAAU,GAAG;;EAE3D,IAAI,IAAI,GAAG;CACX,CAAA,KAAK,IAAI,CAAC,GAA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CACH,CAAC,CACH,CACF,CAAC;;CAED;CACA;CACA;CACA,MAAM0M,uBAAuB,GAAG9M,aAAa,CAAC3B,MAAM,EAAE,CAAC;;CAEvD;CACA;CACA;CACA,MAAM0O,wBAAwB,GAAG/M,aAAa,CAAC3B,MAAM,EAAE,CAAC;;CAExD;CACA;CACA;;CAUA;CACA;CACA;;CAUA;CACA;CACA;;CAUA;CACA;CACA;;CAQA;CACA;CACA;;CAmBA;CACA;CACA;;CAMA;CACA;CACA;;CAGA;CACA;CACA;;CAwBA;CACA;CACA;;CAUA;CACA;CACA;;CAUA;CACA;CACA;;CAUA;CACA;CACA;;CAQA;CACA;CACA;;CAQA;CACA;CACA;;CAQA;CACA;CACA;;CAyCA;CACA;CACA;;CAcA;CACA;CACA;;CAMA;CACA;CACA;;CAMA;CACA;CACA;;CAMA;CACA;CACA;;CAGA;CACA;CACA;;CAGA;CACA;CACA;;CAMA;CACA;CACA;;CAMA;CACA;CACA;;CAKA;CACA;CACA;;CAMA;CACA;CACA;;CAMA;CACA;CACA;;CAGA;CACA;CACA;CACA,MAAM2O,UAAU,GAAGvN,IAAI,CAAC;CACtB9kB,EAAAA,GAAG,EAAEunB,sBAAsB;CAC3BtS,EAAAA,IAAI,EAAEiJ,KAAK,CAACwF,MAAM,EAAE,CAAC;GACrBviB,SAAS,EAAEuiB,MAAM;CACnB,CAAC,CAAC;;CAEF;CACA;CACA;;CAOA;CACA;CACA;CACA,MAAM4O,sBAAsB,GAAGxN,IAAI,CAAC;CAClCF,EAAAA,MAAM,EAAEc,4BAA4B,CAAC2M,UAAU,CAAC;GAChD1F,YAAY,EAAElH,MAAM;CACtB,CAAC,CAAC;;CAEF;CACA;CACA;;CAGA;CACA;CACA;;CAGA;CACA;CACA;;CAKA;CACA;CACA;;CAGA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;;CAMA;CACA;CACA;;CAYA;CACA;CACA;;CAgBA;CACA;CACA;;CAQA;CACA;CACA;;CAGA;CACA;CACA;;CAOA;C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