@latticexyz/world-module-erc20 2.2.18-9fa07c8489f1fbf167d0db01cd9aaa645a29c8e2 → 2.2.18-c2ad22c7feb566e1731ff16e8be291746bdffb3e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var p=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d};
2
+ //# sourceMappingURL=chunk-LURIOADG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,7 @@
1
+ import*as r from"node:crypto";var c=r&&typeof r=="object"&&"webcrypto"in r?r.webcrypto:r&&typeof r=="object"&&"randomBytes"in r?r:void 0;function s(t){if(!Number.isSafeInteger(t)||t<0)throw new Error(`positive integer expected, not ${t}`)}function y(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function f(t,...e){if(!y(t))throw new Error("Uint8Array expected");if(e.length>0&&!e.includes(t.length))throw new Error(`Uint8Array expected of length ${e}, not of length=${t.length}`)}function w(t){if(typeof t!="function"||typeof t.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");s(t.outputLen),s(t.blockLen)}function g(t,e=!0){if(t.destroyed)throw new Error("Hash instance has been destroyed");if(e&&t.finished)throw new Error("Hash#digest() has already been called")}function b(t,e){f(t);let o=e.outputLen;if(t.length<o)throw new Error(`digestInto() expects output buffer of length at least ${o}`)}var L=t=>new Uint32Array(t.buffer,t.byteOffset,Math.floor(t.byteLength/4)),E=t=>new DataView(t.buffer,t.byteOffset,t.byteLength),_=(t,e)=>t<<32-e|t>>>e;var U=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68,l=t=>t<<24&4278190080|t<<8&16711680|t>>>8&65280|t>>>24&255;function B(t){for(let e=0;e<t.length;e++)t[e]=l(t[e])}function d(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}function a(t){return typeof t=="string"&&(t=d(t)),f(t),t}function O(...t){let e=0;for(let n=0;n<t.length;n++){let i=t[n];f(i),e+=i.length}let o=new Uint8Array(e);for(let n=0,i=0;n<t.length;n++){let u=t[n];o.set(u,i),i+=u.length}return o}var p=class{clone(){return this._cloneInto()}},k={}.toString;function j(t){let e=n=>t().update(a(n)).digest(),o=t();return e.outputLen=o.outputLen,e.blockLen=o.blockLen,e.create=()=>t(),e}function S(t){let e=(n,i)=>t(i).update(a(n)).digest(),o=t({});return e.outputLen=o.outputLen,e.blockLen=o.blockLen,e.create=n=>t(n),e}function T(t=32){if(c&&typeof c.getRandomValues=="function")return c.getRandomValues(new Uint8Array(t));if(c&&typeof c.randomBytes=="function")return c.randomBytes(t);throw new Error("crypto.getRandomValues must be defined")}export{s as a,f as b,w as c,g as d,b as e,L as f,E as g,_ as h,U as i,B as j,a as k,O as l,p as m,j as n,S as o,T as p};
2
+ /*! Bundled license information:
3
+
4
+ @noble/hashes/esm/utils.js:
5
+ (*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
6
+ */
7
+ //# sourceMappingURL=chunk-TJJDXMQ6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/src/cryptoNode.ts","../../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/src/_assert.ts","../../../node_modules/.pnpm/@noble+hashes@1.5.0/node_modules/@noble/hashes/src/utils.ts"],"sourcesContent":["// We prefer WebCrypto aka globalThis.crypto, which exists in node.js 16+.\n// Falls back to Node.js built-in crypto for Node.js <=v14\n// See utils.ts for details.\n// @ts-ignore\nimport * as nc from 'node:crypto';\nexport const crypto =\n nc && typeof nc === 'object' && 'webcrypto' in nc\n ? (nc.webcrypto as any)\n : nc && typeof nc === 'object' && 'randomBytes' in nc\n ? nc\n : undefined;\n","function number(n: number) {\n if (!Number.isSafeInteger(n) || n < 0) throw new Error(`positive integer expected, not ${n}`);\n}\n\nfunction bool(b: boolean) {\n if (typeof b !== 'boolean') throw new Error(`boolean expected, not ${b}`);\n}\n\n// copied from utils\nexport function isBytes(a: unknown): a is Uint8Array {\n return (\n a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array')\n );\n}\n\nfunction bytes(b: Uint8Array | undefined, ...lengths: number[]) {\n if (!isBytes(b)) throw new Error('Uint8Array expected');\n if (lengths.length > 0 && !lengths.includes(b.length))\n throw new Error(`Uint8Array expected of length ${lengths}, not of length=${b.length}`);\n}\n\ntype Hash = {\n (data: Uint8Array): Uint8Array;\n blockLen: number;\n outputLen: number;\n create: any;\n};\nfunction hash(h: Hash) {\n if (typeof h !== 'function' || typeof h.create !== 'function')\n throw new Error('Hash should be wrapped by utils.wrapConstructor');\n number(h.outputLen);\n number(h.blockLen);\n}\n\nfunction exists(instance: any, checkFinished = true) {\n if (instance.destroyed) throw new Error('Hash instance has been destroyed');\n if (checkFinished && instance.finished) throw new Error('Hash#digest() has already been called');\n}\nfunction output(out: any, instance: any) {\n bytes(out);\n const min = instance.outputLen;\n if (out.length < min) {\n throw new Error(`digestInto() expects output buffer of length at least ${min}`);\n }\n}\n\nexport { number, bool, bytes, hash, exists, output };\n\nconst assert = { number, bool, bytes, hash, exists, output };\nexport default assert;\n","/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */\n\n// We use WebCrypto aka globalThis.crypto, which exists in browsers and node.js 16+.\n// node.js versions earlier than v19 don't declare it in global scope.\n// For node.js, package.json#exports field mapping rewrites import\n// from `crypto` to `cryptoNode`, which imports native module.\n// Makes the utils un-importable in browsers without a bundler.\n// Once node.js 18 is deprecated (2025-04-30), we can just drop the import.\nimport { crypto } from '@noble/hashes/crypto';\nimport { bytes as abytes } from './_assert.js';\n// export { isBytes } from './_assert.js';\n// We can't reuse isBytes from _assert, because somehow this causes huge perf issues\nexport function isBytes(a: unknown): a is Uint8Array {\n return (\n a instanceof Uint8Array ||\n (a != null && typeof a === 'object' && a.constructor.name === 'Uint8Array')\n );\n}\n\n// prettier-ignore\nexport type TypedArray = Int8Array | Uint8ClampedArray | Uint8Array |\n Uint16Array | Int16Array | Uint32Array | Int32Array;\n\n// Cast array to different type\nexport const u8 = (arr: TypedArray) => new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);\nexport const u32 = (arr: TypedArray) =>\n new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));\n\n// Cast array to view\nexport const createView = (arr: TypedArray) =>\n new DataView(arr.buffer, arr.byteOffset, arr.byteLength);\n\n// The rotate right (circular right shift) operation for uint32\nexport const rotr = (word: number, shift: number) => (word << (32 - shift)) | (word >>> shift);\n// The rotate left (circular left shift) operation for uint32\nexport const rotl = (word: number, shift: number) =>\n (word << shift) | ((word >>> (32 - shift)) >>> 0);\n\nexport const isLE = new Uint8Array(new Uint32Array([0x11223344]).buffer)[0] === 0x44;\n// The byte swap operation for uint32\nexport const byteSwap = (word: number) =>\n ((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: number) => n : (n: number) => byteSwap(n);\n\n// In place byte swap for Uint32Array\nexport function byteSwap32(arr: Uint32Array) {\n for (let i = 0; i < arr.length; i++) {\n arr[i] = byteSwap(arr[i]);\n }\n}\n\n// Array where index 0xf0 (240) is mapped to string 'f0'\nconst hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) =>\n i.toString(16).padStart(2, '0')\n);\n/**\n * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'\n */\nexport function bytesToHex(bytes: Uint8Array): string {\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\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 } as const;\nfunction asciiToBase16(char: number): number | undefined {\n if (char >= asciis._0 && char <= asciis._9) return char - asciis._0;\n if (char >= asciis._A && char <= asciis._F) return char - (asciis._A - 10);\n if (char >= asciis._a && char <= asciis._f) return char - (asciis._a - 10);\n return;\n}\n\n/**\n * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])\n */\nexport function hexToBytes(hex: string): Uint8Array {\n if (typeof hex !== 'string') throw new Error('hex string expected, got ' + typeof hex);\n const hl = hex.length;\n const al = hl / 2;\n if (hl % 2) throw new Error('padded hex string expected, got unpadded hex of length ' + hl);\n const array = new Uint8Array(al);\n for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {\n const n1 = asciiToBase16(hex.charCodeAt(hi));\n const n2 = asciiToBase16(hex.charCodeAt(hi + 1));\n if (n1 === undefined || n2 === undefined) {\n const char = hex[hi] + hex[hi + 1];\n throw new Error('hex string expected, got non-hex character \"' + char + '\" at index ' + hi);\n }\n array[ai] = n1 * 16 + n2;\n }\n return array;\n}\n\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\n// Returns control to thread each 'tick' ms to avoid blocking\nexport async function asyncLoop(iters: number, tick: number, cb: (i: number) => void) {\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) continue;\n await nextTick();\n ts += diff;\n }\n}\n\n// Global symbols in both browsers and Node.js since v11\n// See https://github.com/microsoft/TypeScript/issues/31535\ndeclare const TextEncoder: any;\n\n/**\n * @example utf8ToBytes('abc') // new Uint8Array([97, 98, 99])\n */\nexport function utf8ToBytes(str: string): Uint8Array {\n if (typeof str !== 'string') throw new Error(`utf8ToBytes expected string, got ${typeof str}`);\n return new Uint8Array(new TextEncoder().encode(str)); // https://bugzil.la/1681809\n}\n\nexport type Input = Uint8Array | string;\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: Input): Uint8Array {\n if (typeof data === 'string') data = utf8ToBytes(data);\n abytes(data);\n return data;\n}\n\n/**\n * Copies several Uint8Arrays into one.\n */\nexport function concatBytes(...arrays: Uint8Array[]): Uint8Array {\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\n// For runtime check if class implements interface\nexport abstract class Hash<T extends Hash<T>> {\n abstract blockLen: number; // Bytes per block\n abstract outputLen: number; // Bytes in output\n abstract update(buf: Input): this;\n // Writes digest into buf\n abstract digestInto(buf: Uint8Array): void;\n abstract digest(): Uint8Array;\n /**\n * Resets internal state. Makes Hash instance unusable.\n * Reset is impossible for keyed hashes if key is consumed into state. If digest is not consumed\n * by user, they will need to manually call `destroy()` when zeroing is necessary.\n */\n abstract destroy(): void;\n /**\n * Clones hash instance. Unsafe: doesn't check whether `to` is valid. Can be used as `clone()`\n * when no options are passed.\n * Reasons to use `_cloneInto` instead of clone: 1) performance 2) reuse instance => all internal\n * buffers are overwritten => causes buffer overwrite which is used for digest in some cases.\n * There are no guarantees for clean-up because it's impossible in JS.\n */\n abstract _cloneInto(to?: T): T;\n // Safe version that clones internal state\n clone(): T {\n return this._cloneInto();\n }\n}\n\n/**\n * XOF: streaming API to read digest in chunks.\n * Same as 'squeeze' in keccak/k12 and 'seek' in blake3, but more generic name.\n * When hash used in XOF mode it is up to user to call '.destroy' afterwards, since we cannot\n * destroy state, next call can require more bytes.\n */\nexport type HashXOF<T extends Hash<T>> = Hash<T> & {\n xof(bytes: number): Uint8Array; // Read 'bytes' bytes from digest stream\n xofInto(buf: Uint8Array): Uint8Array; // read buf.length bytes from digest stream into buf\n};\n\nconst toStr = {}.toString;\ntype EmptyObj = {};\nexport function checkOpts<T1 extends EmptyObj, T2 extends EmptyObj>(\n defaults: T1,\n opts?: T2\n): T1 & T2 {\n if (opts !== undefined && toStr.call(opts) !== '[object Object]')\n throw new Error('Options should be object or undefined');\n const merged = Object.assign(defaults, opts);\n return merged as T1 & T2;\n}\n\nexport type CHash = ReturnType<typeof wrapConstructor>;\n\nexport function wrapConstructor<T extends Hash<T>>(hashCons: () => Hash<T>) {\n const hashC = (msg: Input): Uint8Array => 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}\n\nexport function wrapConstructorWithOpts<H extends Hash<H>, T extends Object>(\n hashCons: (opts?: T) => Hash<H>\n) {\n const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({} as T);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts: T) => hashCons(opts);\n return hashC;\n}\n\nexport function wrapXOFConstructorWithOpts<H extends HashXOF<H>, T extends Object>(\n hashCons: (opts?: T) => HashXOF<H>\n) {\n const hashC = (msg: Input, opts?: T): Uint8Array => hashCons(opts).update(toBytes(msg)).digest();\n const tmp = hashCons({} as T);\n hashC.outputLen = tmp.outputLen;\n hashC.blockLen = tmp.blockLen;\n hashC.create = (opts: T) => hashCons(opts);\n return hashC;\n}\n\n/**\n * Secure PRNG. Uses `crypto.getRandomValues`, which defers to OS.\n */\nexport function randomBytes(bytesLength = 32): Uint8Array {\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"],"mappings":"AAIA,UAAYA,MAAQ,cACb,IAAMC,EACXD,GAAM,OAAOA,GAAO,UAAY,cAAeA,EACvC,YACJA,GAAM,OAAOA,GAAO,UAAY,gBAAiBA,EAC/CA,EACA,OCVR,SAASE,EAAOC,EAAS,CACvB,GAAI,CAAC,OAAO,cAAcA,CAAC,GAAKA,EAAI,EAAG,MAAM,IAAI,MAAM,kCAAkCA,CAAC,EAAE,CAC9F,CAOM,SAAUC,EAAQC,EAAU,CAChC,OACEA,aAAa,YACZA,GAAK,MAAQ,OAAOA,GAAM,UAAYA,EAAE,YAAY,OAAS,YAElE,CAEA,SAASC,EAAMC,KAA8BC,EAAiB,CAC5D,GAAI,CAACJ,EAAQG,CAAC,EAAG,MAAM,IAAI,MAAM,qBAAqB,EACtD,GAAIC,EAAQ,OAAS,GAAK,CAACA,EAAQ,SAASD,EAAE,MAAM,EAClD,MAAM,IAAI,MAAM,iCAAiCC,CAAO,mBAAmBD,EAAE,MAAM,EAAE,CACzF,CAQA,SAASE,EAAKC,EAAO,CACnB,GAAI,OAAOA,GAAM,YAAc,OAAOA,EAAE,QAAW,WACjD,MAAM,IAAI,MAAM,iDAAiD,EACnEC,EAAOD,EAAE,SAAS,EAClBC,EAAOD,EAAE,QAAQ,CACnB,CAEA,SAASE,EAAOC,EAAeC,EAAgB,GAAI,CACjD,GAAID,EAAS,UAAW,MAAM,IAAI,MAAM,kCAAkC,EAC1E,GAAIC,GAAiBD,EAAS,SAAU,MAAM,IAAI,MAAM,uCAAuC,CACjG,CACA,SAASE,EAAOC,EAAUH,EAAa,CACrCP,EAAMU,CAAG,EACT,IAAMC,EAAMJ,EAAS,UACrB,GAAIG,EAAI,OAASC,EACf,MAAM,IAAI,MAAM,yDAAyDA,CAAG,EAAE,CAElF,CCpBO,IAAMC,EAAOC,GAClB,IAAI,YAAYA,EAAI,OAAQA,EAAI,WAAY,KAAK,MAAMA,EAAI,WAAa,CAAC,CAAC,EAG/DC,EAAcD,GACzB,IAAI,SAASA,EAAI,OAAQA,EAAI,WAAYA,EAAI,UAAU,EAG5CE,EAAO,CAACC,EAAcC,IAAmBD,GAAS,GAAKC,EAAWD,IAASC,EAKjF,IAAMC,EAAO,IAAI,WAAW,IAAI,YAAY,CAAC,SAAU,CAAC,EAAE,MAAM,EAAE,CAAC,IAAM,GAEnEC,EAAYC,GACrBA,GAAQ,GAAM,WACdA,GAAQ,EAAK,SACbA,IAAS,EAAK,MACdA,IAAS,GAAM,IAKb,SAAUC,EAAWC,EAAgB,CACzC,QAASC,EAAI,EAAGA,EAAID,EAAI,OAAQC,IAC9BD,EAAIC,CAAC,EAAIC,EAASF,EAAIC,CAAC,CAAC,CAE5B,CA0EM,SAAUE,EAAYC,EAAW,CACrC,GAAI,OAAOA,GAAQ,SAAU,MAAM,IAAI,MAAM,oCAAoC,OAAOA,CAAG,EAAE,EAC7F,OAAO,IAAI,WAAW,IAAI,YAAW,EAAG,OAAOA,CAAG,CAAC,CACrD,CAQM,SAAUC,EAAQC,EAAW,CACjC,OAAI,OAAOA,GAAS,WAAUA,EAAOH,EAAYG,CAAI,GACrDC,EAAOD,CAAI,EACJA,CACT,CAKM,SAAUE,KAAeC,EAAoB,CACjD,IAAIC,EAAM,EACV,QAASC,EAAI,EAAGA,EAAIF,EAAO,OAAQE,IAAK,CACtC,IAAMC,EAAIH,EAAOE,CAAC,EAClBJ,EAAOK,CAAC,EACRF,GAAOE,EAAE,MACX,CACA,IAAMC,EAAM,IAAI,WAAWH,CAAG,EAC9B,QAASC,EAAI,EAAGG,EAAM,EAAGH,EAAIF,EAAO,OAAQE,IAAK,CAC/C,IAAMC,EAAIH,EAAOE,CAAC,EAClBE,EAAI,IAAID,EAAGE,CAAG,EACdA,GAAOF,EAAE,MACX,CACA,OAAOC,CACT,CAGM,IAAgBE,EAAhB,KAAoB,CAsBxB,OAAK,CACH,OAAO,KAAK,WAAU,CACxB,GAcIC,EAAQ,CAAA,EAAG,SAcX,SAAUC,EAAmCC,EAAuB,CACxE,IAAMC,EAASC,GAA2BF,EAAQ,EAAG,OAAOG,EAAQD,CAAG,CAAC,EAAE,OAAM,EAC1EE,EAAMJ,EAAQ,EACpB,OAAAC,EAAM,UAAYG,EAAI,UACtBH,EAAM,SAAWG,EAAI,SACrBH,EAAM,OAAS,IAAMD,EAAQ,EACtBC,CACT,CAaM,SAAUI,EACdC,EAAkC,CAElC,IAAMC,EAAQ,CAACC,EAAYC,IAAyBH,EAASG,CAAI,EAAE,OAAOC,EAAQF,CAAG,CAAC,EAAE,OAAM,EACxFG,EAAML,EAAS,CAAA,CAAO,EAC5B,OAAAC,EAAM,UAAYI,EAAI,UACtBJ,EAAM,SAAWI,EAAI,SACrBJ,EAAM,OAAUE,GAAYH,EAASG,CAAI,EAClCF,CACT,CAKM,SAAUK,EAAYC,EAAc,GAAE,CAC1C,GAAIC,GAAU,OAAOA,EAAO,iBAAoB,WAC9C,OAAOA,EAAO,gBAAgB,IAAI,WAAWD,CAAW,CAAC,EAG3D,GAAIC,GAAU,OAAOA,EAAO,aAAgB,WAC1C,OAAOA,EAAO,YAAYD,CAAW,EAEvC,MAAM,IAAI,MAAM,wCAAwC,CAC1D","names":["nc","crypto","number","n","isBytes","a","bytes","b","lengths","hash","h","number","exists","instance","checkFinished","output","out","min","u32","arr","createView","rotr","word","shift","isLE","byteSwap","word","byteSwap32","arr","i","byteSwap","utf8ToBytes","str","toBytes","data","bytes","concatBytes","arrays","sum","i","a","res","pad","Hash","toStr","wrapConstructor","hashCons","hashC","msg","toBytes","tmp","wrapXOFConstructorWithOpts","hashCons","hashC","msg","opts","toBytes","tmp","randomBytes","bytesLength","crypto"]}
package/dist/internal.js CHANGED
@@ -1,39 +1,2 @@
1
- import {
2
- encodeAbiParameters,
3
- stringToHex
4
- } from "./chunk-GF52EVJ6.js";
5
- import "./chunk-DJZL27OA.js";
6
- import {
7
- init_esm_shims
8
- } from "./chunk-M7XPBMRG.js";
9
-
10
- // ts/exports/internal.ts
11
- init_esm_shims();
12
-
13
- // ts/defineERC20Module.ts
14
- init_esm_shims();
15
-
16
- // ../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/_esm/index.js
17
- init_esm_shims();
18
-
19
- // ts/defineERC20Module.ts
20
- function defineERC20Module({ namespace, name, symbol }) {
21
- const erc20ModuleArgs = encodeAbiParameters(
22
- [{ type: "bytes14" }, { type: "string" }, { type: "string" }],
23
- [stringToHex(namespace, { size: 14 }), name, symbol]
24
- );
25
- return {
26
- artifactPath: "@latticexyz/world-module-erc20/out/ERC20Module.sol/ERC20Module.json",
27
- root: false,
28
- args: [
29
- {
30
- type: "bytes",
31
- value: erc20ModuleArgs
32
- }
33
- ]
34
- };
35
- }
36
- export {
37
- defineERC20Module
38
- };
1
+ import{a as r,b as o}from"./chunk-GSBUANUZ.js";import"./chunk-TJJDXMQ6.js";import"./chunk-LURIOADG.js";function a({namespace:e,name:t,symbol:n}){return{artifactPath:"@latticexyz/world-module-erc20/out/ERC20Module.sol/ERC20Module.json",root:!1,args:[{type:"bytes",value:o([{type:"bytes14"},{type:"string"},{type:"string"}],[r(e,{size:14}),t,n])}]}}export{a as defineERC20Module};
39
2
  //# sourceMappingURL=internal.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../ts/exports/internal.ts","../ts/defineERC20Module.ts","../../../node_modules/.pnpm/viem@2.21.19_bufferutil@4.0.8_typescript@5.4.2_utf-8-validate@5.0.10_zod@3.23.8/node_modules/viem/index.ts"],"sourcesContent":["export { defineERC20Module } from \"../defineERC20Module\";\n","import { encodeAbiParameters, stringToHex } from \"viem\";\nimport { ModuleInput } from \"@latticexyz/world/internal\";\n\nexport type DefineERC20ModuleInput = {\n namespace: string;\n name: string;\n symbol: string;\n};\n\nexport function defineERC20Module({ namespace, name, symbol }: DefineERC20ModuleInput): ModuleInput {\n const erc20ModuleArgs = encodeAbiParameters(\n [{ type: \"bytes14\" }, { type: \"string\" }, { type: \"string\" }],\n [stringToHex(namespace, { size: 14 }), name, symbol],\n );\n\n return {\n artifactPath: \"@latticexyz/world-module-erc20/out/ERC20Module.sol/ERC20Module.json\",\n root: false,\n args: [\n {\n type: \"bytes\",\n value: erc20ModuleArgs,\n },\n ],\n };\n}\n","// biome-ignore lint/performance/noBarrelFile: entrypoint module\nexport {\n type Abi,\n type AbiFunction,\n type AbiParameter,\n type AbiEvent,\n type AbiStateMutability,\n type AbiParameterKind,\n type AbiParameterToPrimitiveType,\n type Address,\n type Narrow,\n type ParseAbi,\n type ParseAbiItem,\n type ParseAbiParameter,\n type ParseAbiParameters,\n type ResolvedRegister,\n type TypedData,\n type TypedDataDomain,\n type TypedDataParameter,\n CircularReferenceError,\n InvalidAbiParameterError,\n InvalidAbiParametersError,\n InvalidAbiItemError,\n InvalidAbiTypeParameterError,\n InvalidFunctionModifierError,\n InvalidModifierError,\n InvalidParameterError,\n InvalidParenthesisError,\n InvalidSignatureError,\n InvalidStructSignatureError,\n SolidityProtectedKeywordError,\n UnknownTypeError,\n UnknownSignatureError,\n parseAbi,\n parseAbiItem,\n parseAbiParameter,\n parseAbiParameters,\n} from 'abitype'\n\nexport {\n getContract,\n type GetContractErrorType,\n type GetContractParameters,\n type GetContractReturnType,\n} from './actions/getContract.js'\nexport {\n type GetContractEventsErrorType,\n type GetContractEventsParameters,\n type GetContractEventsReturnType,\n} from './actions/public/getContractEvents.js'\nexport {\n type GetEip712DomainErrorType,\n type GetEip712DomainParameters,\n type GetEip712DomainReturnType,\n} from './actions/public/getEip712Domain.js'\nexport {\n type AddChainErrorType,\n type AddChainParameters,\n} from './actions/wallet/addChain.js'\nexport {\n type CallErrorType,\n type CallParameters,\n type CallReturnType,\n} from './actions/public/call.js'\nexport type {\n CreateBlockFilterErrorType,\n CreateBlockFilterReturnType,\n} from './actions/public/createBlockFilter.js'\nexport type {\n CreateContractEventFilterErrorType,\n CreateContractEventFilterParameters,\n CreateContractEventFilterReturnType,\n} from './actions/public/createContractEventFilter.js'\nexport type {\n CreateEventFilterErrorType,\n CreateEventFilterParameters,\n CreateEventFilterReturnType,\n} from './actions/public/createEventFilter.js'\nexport type {\n CreatePendingTransactionFilterErrorType,\n CreatePendingTransactionFilterReturnType,\n} from './actions/public/createPendingTransactionFilter.js'\nexport type {\n DeployContractErrorType,\n DeployContractParameters,\n DeployContractReturnType,\n} from './actions/wallet/deployContract.js'\nexport type {\n DropTransactionErrorType,\n DropTransactionParameters,\n} from './actions/test/dropTransaction.js'\nexport type {\n DumpStateErrorType,\n DumpStateReturnType,\n} from './actions/test/dumpState.js'\nexport type {\n GetAutomineErrorType,\n GetAutomineReturnType,\n} from './actions/test/getAutomine.js'\nexport type {\n EstimateContractGasErrorType,\n EstimateContractGasParameters,\n EstimateContractGasReturnType,\n} from './actions/public/estimateContractGas.js'\nexport type {\n EstimateGasErrorType,\n EstimateGasParameters,\n EstimateGasReturnType,\n} from './actions/public/estimateGas.js'\nexport type {\n EstimateFeesPerGasErrorType,\n EstimateFeesPerGasParameters,\n EstimateFeesPerGasReturnType,\n} from './actions/public/estimateFeesPerGas.js'\nexport type {\n EstimateMaxPriorityFeePerGasErrorType,\n EstimateMaxPriorityFeePerGasParameters,\n EstimateMaxPriorityFeePerGasReturnType,\n} from './actions/public/estimateMaxPriorityFeePerGas.js'\nexport type {\n GetAddressesErrorType,\n GetAddressesReturnType,\n} from './actions/wallet/getAddresses.js'\nexport type {\n GetBalanceErrorType,\n GetBalanceParameters,\n GetBalanceReturnType,\n} from './actions/public/getBalance.js'\nexport type {\n GetBlobBaseFeeErrorType,\n GetBlobBaseFeeReturnType,\n} from './actions/public/getBlobBaseFee.js'\nexport type {\n GetBlockNumberErrorType,\n GetBlockNumberParameters,\n GetBlockNumberReturnType,\n} from './actions/public/getBlockNumber.js'\nexport type {\n GetBlockErrorType,\n GetBlockParameters,\n GetBlockReturnType,\n} from './actions/public/getBlock.js'\nexport type {\n GetBlockTransactionCountErrorType,\n GetBlockTransactionCountParameters,\n GetBlockTransactionCountReturnType,\n} from './actions/public/getBlockTransactionCount.js'\nexport type {\n /** @deprecated Use `GetCodeErrorType` instead */\n GetCodeErrorType as GetBytecodeErrorType,\n /** @deprecated Use `GetCodeParameters` instead */\n GetCodeParameters as GetBytecodeParameters,\n /** @deprecated Use `GetCodeReturnType` instead */\n GetCodeReturnType as GetBytecodeReturnType,\n GetCodeErrorType,\n GetCodeParameters,\n GetCodeReturnType,\n} from './actions/public/getCode.js'\nexport type {\n GetChainIdErrorType,\n GetChainIdReturnType,\n} from './actions/public/getChainId.js'\nexport type {\n GetEnsAddressErrorType,\n GetEnsAddressParameters,\n GetEnsAddressReturnType,\n} from './actions/ens/getEnsAddress.js'\nexport type {\n GetEnsAvatarErrorType,\n GetEnsAvatarParameters,\n GetEnsAvatarReturnType,\n} from './actions/ens/getEnsAvatar.js'\nexport type {\n GetEnsNameErrorType,\n GetEnsNameParameters,\n GetEnsNameReturnType,\n} from './actions/ens/getEnsName.js'\nexport type {\n GetEnsResolverErrorType,\n GetEnsResolverParameters,\n GetEnsResolverReturnType,\n} from './actions/ens/getEnsResolver.js'\nexport type {\n GetEnsTextErrorType,\n GetEnsTextParameters,\n GetEnsTextReturnType,\n} from './actions/ens/getEnsText.js'\nexport type {\n GetFeeHistoryErrorType,\n GetFeeHistoryParameters,\n GetFeeHistoryReturnType,\n} from './actions/public/getFeeHistory.js'\nexport type {\n GetFilterChangesErrorType,\n GetFilterChangesParameters,\n GetFilterChangesReturnType,\n} from './actions/public/getFilterChanges.js'\nexport type {\n GetFilterLogsErrorType,\n GetFilterLogsParameters,\n GetFilterLogsReturnType,\n} from './actions/public/getFilterLogs.js'\nexport type {\n GetGasPriceErrorType,\n GetGasPriceReturnType,\n} from './actions/public/getGasPrice.js'\nexport type {\n GetLogsErrorType,\n GetLogsParameters,\n GetLogsReturnType,\n} from './actions/public/getLogs.js'\nexport type {\n GetPermissionsErrorType,\n GetPermissionsReturnType,\n} from './actions/wallet/getPermissions.js'\nexport type {\n GetProofErrorType,\n GetProofParameters,\n GetProofReturnType,\n} from './actions/public/getProof.js'\nexport type {\n GetStorageAtErrorType,\n GetStorageAtParameters,\n GetStorageAtReturnType,\n} from './actions/public/getStorageAt.js'\nexport type {\n GetTransactionConfirmationsErrorType,\n GetTransactionConfirmationsParameters,\n GetTransactionConfirmationsReturnType,\n} from './actions/public/getTransactionConfirmations.js'\nexport type {\n GetTransactionCountErrorType,\n GetTransactionCountParameters,\n GetTransactionCountReturnType,\n} from './actions/public/getTransactionCount.js'\nexport type {\n GetTransactionErrorType,\n GetTransactionParameters,\n GetTransactionReturnType,\n} from './actions/public/getTransaction.js'\nexport type {\n GetTransactionReceiptErrorType,\n GetTransactionReceiptParameters,\n GetTransactionReceiptReturnType,\n} from './actions/public/getTransactionReceipt.js'\nexport type {\n ImpersonateAccountErrorType,\n ImpersonateAccountParameters,\n} from './actions/test/impersonateAccount.js'\nexport type {\n IncreaseTimeErrorType,\n IncreaseTimeParameters,\n} from './actions/test/increaseTime.js'\nexport type {\n LoadStateErrorType,\n LoadStateParameters,\n LoadStateReturnType,\n} from './actions/test/loadState.js'\nexport type { MineErrorType, MineParameters } from './actions/test/mine.js'\nexport type {\n MulticallErrorType,\n MulticallParameters,\n MulticallReturnType,\n} from './actions/public/multicall.js'\nexport type { SnapshotErrorType } from './actions/test/snapshot.js'\nexport type {\n OnBlock,\n OnBlockParameter,\n WatchBlocksErrorType,\n WatchBlocksParameters,\n WatchBlocksReturnType,\n} from './actions/public/watchBlocks.js'\nexport type {\n OnBlockNumberFn,\n OnBlockNumberParameter,\n WatchBlockNumberErrorType,\n WatchBlockNumberParameters,\n WatchBlockNumberReturnType,\n} from './actions/public/watchBlockNumber.js'\nexport type {\n WatchEventOnLogsFn,\n WatchEventOnLogsParameter,\n WatchEventErrorType,\n WatchEventParameters,\n WatchEventReturnType,\n} from './actions/public/watchEvent.js'\nexport type {\n OnTransactionsFn,\n OnTransactionsParameter,\n WatchPendingTransactionsErrorType,\n WatchPendingTransactionsParameters,\n WatchPendingTransactionsReturnType,\n} from './actions/public/watchPendingTransactions.js'\nexport type {\n ReadContractErrorType,\n ReadContractParameters,\n ReadContractReturnType,\n} from './actions/public/readContract.js'\nexport type {\n ReplacementReason,\n ReplacementReturnType,\n WaitForTransactionReceiptErrorType,\n WaitForTransactionReceiptParameters,\n WaitForTransactionReceiptReturnType,\n} from './actions/public/waitForTransactionReceipt.js'\nexport type {\n RequestAddressesErrorType,\n RequestAddressesReturnType,\n} from './actions/wallet/requestAddresses.js'\nexport type {\n RequestPermissionsErrorType,\n RequestPermissionsReturnType,\n RequestPermissionsParameters,\n} from './actions/wallet/requestPermissions.js'\nexport type {\n GetTxpoolContentErrorType,\n GetTxpoolContentReturnType,\n} from './actions/test/getTxpoolContent.js'\nexport type {\n GetTxpoolStatusErrorType,\n GetTxpoolStatusReturnType,\n} from './actions/test/getTxpoolStatus.js'\nexport type {\n InspectTxpoolErrorType,\n InspectTxpoolReturnType,\n} from './actions/test/inspectTxpool.js'\nexport type { RemoveBlockTimestampIntervalErrorType } from './actions/test/removeBlockTimestampInterval.js'\nexport type { ResetErrorType, ResetParameters } from './actions/test/reset.js'\nexport type {\n RevertErrorType,\n RevertParameters,\n} from './actions/test/revert.js'\nexport type {\n SendRawTransactionErrorType,\n SendRawTransactionParameters,\n SendRawTransactionReturnType,\n} from './actions/wallet/sendRawTransaction.js'\nexport type {\n SendTransactionErrorType,\n SendTransactionParameters,\n SendTransactionRequest,\n SendTransactionReturnType,\n} from './actions/wallet/sendTransaction.js'\nexport type {\n SignTransactionErrorType,\n SignTransactionParameters,\n SignTransactionReturnType,\n} from './actions/wallet/signTransaction.js'\nexport type {\n PrepareTransactionRequestErrorType,\n PrepareTransactionRequestParameters,\n PrepareTransactionRequestParameterType,\n PrepareTransactionRequestRequest,\n PrepareTransactionRequestReturnType,\n} from './actions/wallet/prepareTransactionRequest.js'\nexport type {\n SendUnsignedTransactionErrorType,\n SendUnsignedTransactionParameters,\n SendUnsignedTransactionReturnType,\n} from './actions/test/sendUnsignedTransaction.js'\nexport type { SetAutomineErrorType } from './actions/test/setAutomine.js'\nexport type {\n SetBalanceErrorType,\n SetBalanceParameters,\n} from './actions/test/setBalance.js'\nexport type {\n SetBlockGasLimitErrorType,\n SetBlockGasLimitParameters,\n} from './actions/test/setBlockGasLimit.js'\nexport type {\n SetBlockTimestampIntervalErrorType,\n SetBlockTimestampIntervalParameters,\n} from './actions/test/setBlockTimestampInterval.js'\nexport type {\n SetCodeErrorType,\n SetCodeParameters,\n} from './actions/test/setCode.js'\nexport type {\n SetCoinbaseErrorType,\n SetCoinbaseParameters,\n} from './actions/test/setCoinbase.js'\nexport type {\n SetIntervalMiningErrorType,\n SetIntervalMiningParameters,\n} from './actions/test/setIntervalMining.js'\nexport type { SetLoggingEnabledErrorType } from './actions/test/setLoggingEnabled.js'\nexport type {\n SetMinGasPriceErrorType,\n SetMinGasPriceParameters,\n} from './actions/test/setMinGasPrice.js'\nexport type {\n SetNextBlockBaseFeePerGasErrorType,\n SetNextBlockBaseFeePerGasParameters,\n} from './actions/test/setNextBlockBaseFeePerGas.js'\nexport type {\n SetNextBlockTimestampErrorType,\n SetNextBlockTimestampParameters,\n} from './actions/test/setNextBlockTimestamp.js'\nexport type {\n SetNonceErrorType,\n SetNonceParameters,\n} from './actions/test/setNonce.js'\nexport type { SetRpcUrlErrorType } from './actions/test/setRpcUrl.js'\nexport type {\n SetStorageAtErrorType,\n SetStorageAtParameters,\n} from './actions/test/setStorageAt.js'\nexport type {\n SignMessageErrorType,\n SignMessageParameters,\n SignMessageReturnType,\n} from './actions/wallet/signMessage.js'\nexport type {\n SignTypedDataErrorType,\n SignTypedDataParameters,\n SignTypedDataReturnType,\n} from './actions/wallet/signTypedData.js'\nexport type {\n SimulateContractErrorType,\n SimulateContractParameters,\n SimulateContractReturnType,\n} from './actions/public/simulateContract.js'\nexport type {\n StopImpersonatingAccountErrorType,\n StopImpersonatingAccountParameters,\n} from './actions/test/stopImpersonatingAccount.js'\nexport type {\n SwitchChainErrorType,\n SwitchChainParameters,\n} from './actions/wallet/switchChain.js'\nexport type {\n UninstallFilterErrorType,\n UninstallFilterParameters,\n UninstallFilterReturnType,\n} from './actions/public/uninstallFilter.js'\nexport type {\n WatchAssetErrorType,\n WatchAssetParameters,\n WatchAssetReturnType,\n} from './actions/wallet/watchAsset.js'\nexport type {\n VerifyHashErrorType as VerifyHashActionErrorType,\n VerifyHashParameters as VerifyHashActionParameters,\n VerifyHashReturnType as VerifyHashActionReturnType,\n} from './actions/public/verifyHash.js'\nexport type {\n VerifyTypedDataErrorType as VerifyTypedDataActionErrorType,\n VerifyTypedDataParameters as VerifyTypedDataActionParameters,\n VerifyTypedDataReturnType as VerifyTypedDataActionReturnType,\n} from './actions/public/verifyTypedData.js'\nexport type {\n VerifyMessageErrorType as VerifyMessageActionErrorType,\n VerifyMessageParameters as VerifyMessageActionParameters,\n VerifyMessageReturnType as VerifyMessageActionReturnType,\n} from './actions/public/verifyMessage.js'\nexport type {\n WatchContractEventOnLogsFn,\n WatchContractEventOnLogsParameter,\n WatchContractEventErrorType,\n WatchContractEventParameters,\n WatchContractEventReturnType,\n} from './actions/public/watchContractEvent.js'\nexport type {\n WriteContractErrorType,\n WriteContractParameters,\n WriteContractReturnType,\n} from './actions/wallet/writeContract.js'\nexport type {\n Chain,\n ChainConfig,\n ChainContract,\n ChainEstimateFeesPerGasFn,\n ChainFees,\n ChainFeesFnParameters,\n ChainFormatter,\n ChainEstimateFeesPerGasFnParameters,\n ChainMaxPriorityFeePerGasFn,\n DeriveChain,\n GetChainParameter,\n ChainFormatters,\n ChainSerializers,\n ExtractChainFormatterExclude,\n ExtractChainFormatterParameters,\n ExtractChainFormatterReturnType,\n} from './types/chain.js'\nexport type { GetTransactionRequestKzgParameter, Kzg } from './types/kzg.js'\nexport {\n type Client,\n type ClientConfig,\n type CreateClientErrorType,\n type MulticallBatchOptions,\n createClient,\n rpcSchema,\n} from './clients/createClient.js'\nexport {\n type CustomTransport,\n type CustomTransportConfig,\n type CustomTransportErrorType,\n custom,\n} from './clients/transports/custom.js'\nexport {\n type FallbackTransport,\n type FallbackTransportConfig,\n type FallbackTransportErrorType,\n fallback,\n} from './clients/transports/fallback.js'\nexport {\n type HttpTransport,\n type HttpTransportConfig,\n type HttpTransportErrorType,\n http,\n} from './clients/transports/http.js'\nexport {\n type PublicClient,\n type PublicClientConfig,\n type CreatePublicClientErrorType,\n createPublicClient,\n} from './clients/createPublicClient.js'\nexport {\n type TestClient,\n type TestClientConfig,\n type CreateTestClientErrorType,\n createTestClient,\n} from './clients/createTestClient.js'\nexport {\n type PublicActions,\n publicActions,\n} from './clients/decorators/public.js'\nexport {\n type TestActions,\n testActions,\n} from './clients/decorators/test.js'\nexport {\n type WalletActions,\n walletActions,\n} from './clients/decorators/wallet.js'\nexport {\n type Transport,\n type TransportConfig,\n type CreateTransportErrorType,\n createTransport,\n} from './clients/transports/createTransport.js'\nexport {\n type WalletClient,\n type WalletClientConfig,\n type CreateWalletClientErrorType,\n createWalletClient,\n} from './clients/createWalletClient.js'\nexport {\n type WebSocketTransport,\n type WebSocketTransportConfig,\n type WebSocketTransportErrorType,\n webSocket,\n} from './clients/transports/webSocket.js'\nexport {\n multicall3Abi,\n erc20Abi,\n erc20Abi_bytes32,\n erc721Abi,\n erc4626Abi,\n universalSignatureValidatorAbi,\n} from './constants/abis.js'\nexport { zeroAddress } from './constants/address.js'\nexport {\n deploylessCallViaBytecodeBytecode,\n deploylessCallViaFactoryBytecode,\n universalSignatureValidatorByteCode,\n} from './constants/contracts.js'\nexport { etherUnits, gweiUnits, weiUnits } from './constants/unit.js'\nexport {\n maxInt8,\n maxInt16,\n maxInt24,\n maxInt32,\n maxInt40,\n maxInt48,\n maxInt56,\n maxInt64,\n maxInt72,\n maxInt80,\n maxInt88,\n maxInt96,\n maxInt104,\n maxInt112,\n maxInt120,\n maxInt128,\n maxInt136,\n maxInt144,\n maxInt152,\n maxInt160,\n maxInt168,\n maxInt176,\n maxInt184,\n maxInt192,\n maxInt200,\n maxInt208,\n maxInt216,\n maxInt224,\n maxInt232,\n maxInt240,\n maxInt248,\n maxInt256,\n maxUint8,\n maxUint16,\n maxUint24,\n maxUint32,\n maxUint40,\n maxUint48,\n maxUint56,\n maxUint64,\n maxUint72,\n maxUint80,\n maxUint88,\n maxUint96,\n maxUint104,\n maxUint112,\n maxUint120,\n maxUint128,\n maxUint136,\n maxUint144,\n maxUint152,\n maxUint160,\n maxUint168,\n maxUint176,\n maxUint184,\n maxUint192,\n maxUint200,\n maxUint208,\n maxUint216,\n maxUint224,\n maxUint232,\n maxUint240,\n maxUint248,\n maxUint256,\n minInt8,\n minInt16,\n minInt24,\n minInt32,\n minInt40,\n minInt48,\n minInt56,\n minInt64,\n minInt72,\n minInt80,\n minInt88,\n minInt96,\n minInt104,\n minInt112,\n minInt120,\n minInt128,\n minInt136,\n minInt144,\n minInt152,\n minInt160,\n minInt168,\n minInt176,\n minInt184,\n minInt192,\n minInt200,\n minInt208,\n minInt216,\n minInt224,\n minInt232,\n minInt240,\n minInt248,\n minInt256,\n} from './constants/number.js'\nexport { zeroHash } from './constants/bytes.js'\nexport { presignMessagePrefix } from './constants/strings.js'\nexport {\n AbiConstructorNotFoundError,\n type AbiConstructorNotFoundErrorType,\n AbiConstructorParamsNotFoundError,\n type AbiConstructorParamsNotFoundErrorType,\n AbiDecodingDataSizeInvalidError,\n type AbiDecodingDataSizeInvalidErrorType,\n AbiDecodingDataSizeTooSmallError,\n type AbiDecodingDataSizeTooSmallErrorType,\n AbiDecodingZeroDataError,\n type AbiDecodingZeroDataErrorType,\n AbiEncodingArrayLengthMismatchError,\n type AbiEncodingArrayLengthMismatchErrorType,\n AbiEncodingLengthMismatchError,\n type AbiEncodingLengthMismatchErrorType,\n AbiEncodingBytesSizeMismatchError,\n type AbiEncodingBytesSizeMismatchErrorType,\n AbiErrorInputsNotFoundError,\n type AbiErrorInputsNotFoundErrorType,\n AbiErrorNotFoundError,\n type AbiErrorNotFoundErrorType,\n AbiErrorSignatureNotFoundError,\n type AbiErrorSignatureNotFoundErrorType,\n AbiEventNotFoundError,\n type AbiEventNotFoundErrorType,\n AbiEventSignatureEmptyTopicsError,\n type AbiEventSignatureEmptyTopicsErrorType,\n AbiEventSignatureNotFoundError,\n type AbiEventSignatureNotFoundErrorType,\n AbiFunctionNotFoundError,\n type AbiFunctionNotFoundErrorType,\n AbiFunctionOutputsNotFoundError,\n type AbiFunctionOutputsNotFoundErrorType,\n AbiFunctionSignatureNotFoundError,\n type AbiFunctionSignatureNotFoundErrorType,\n BytesSizeMismatchError,\n type BytesSizeMismatchErrorType,\n DecodeLogDataMismatch,\n type DecodeLogDataMismatchErrorType,\n DecodeLogTopicsMismatch,\n type DecodeLogTopicsMismatchErrorType,\n InvalidAbiDecodingTypeError,\n type InvalidAbiDecodingTypeErrorType,\n InvalidAbiEncodingTypeError,\n type InvalidAbiEncodingTypeErrorType,\n InvalidArrayError,\n type InvalidArrayErrorType,\n InvalidDefinitionTypeError,\n type InvalidDefinitionTypeErrorType,\n UnsupportedPackedAbiType,\n type UnsupportedPackedAbiTypeErrorType,\n} from './errors/abi.js'\nexport { BaseError, type BaseErrorType, setErrorConfig } from './errors/base.js'\nexport {\n BlockNotFoundError,\n type BlockNotFoundErrorType,\n} from './errors/block.js'\nexport {\n CallExecutionError,\n type CallExecutionErrorType,\n ContractFunctionExecutionError,\n type ContractFunctionExecutionErrorType,\n ContractFunctionRevertedError,\n type ContractFunctionRevertedErrorType,\n ContractFunctionZeroDataError,\n type ContractFunctionZeroDataErrorType,\n RawContractError,\n type RawContractErrorType,\n CounterfactualDeploymentFailedError,\n type CounterfactualDeploymentFailedErrorType,\n} from './errors/contract.js'\nexport {\n BaseFeeScalarError,\n type BaseFeeScalarErrorType,\n Eip1559FeesNotSupportedError,\n type Eip1559FeesNotSupportedErrorType,\n MaxFeePerGasTooLowError,\n type MaxFeePerGasTooLowErrorType,\n} from './errors/fee.js'\nexport {\n ChainDisconnectedError,\n type ChainDisconnectedErrorType,\n InternalRpcError,\n type InternalRpcErrorType,\n InvalidInputRpcError,\n type InvalidInputRpcErrorType,\n InvalidParamsRpcError,\n type InvalidParamsRpcErrorType,\n InvalidRequestRpcError,\n type InvalidRequestRpcErrorType,\n JsonRpcVersionUnsupportedError,\n type JsonRpcVersionUnsupportedErrorType,\n LimitExceededRpcError,\n type LimitExceededRpcErrorType,\n MethodNotFoundRpcError,\n type MethodNotFoundRpcErrorType,\n MethodNotSupportedRpcError,\n type MethodNotSupportedRpcErrorType,\n ParseRpcError,\n type ParseRpcErrorType,\n ProviderDisconnectedError,\n type ProviderDisconnectedErrorType,\n ProviderRpcError,\n type ProviderRpcErrorCode,\n type ProviderRpcErrorType,\n ResourceNotFoundRpcError,\n type ResourceNotFoundRpcErrorType,\n ResourceUnavailableRpcError,\n type ResourceUnavailableRpcErrorType,\n RpcError,\n type RpcErrorType,\n type RpcErrorCode,\n SwitchChainError,\n TransactionRejectedRpcError,\n type TransactionRejectedRpcErrorType,\n UnauthorizedProviderError,\n type UnauthorizedProviderErrorType,\n UnknownRpcError,\n type UnknownRpcErrorType,\n UnsupportedProviderMethodError,\n type UnsupportedProviderMethodErrorType,\n UserRejectedRequestError,\n type UserRejectedRequestErrorType,\n} from './errors/rpc.js'\nexport {\n ChainDoesNotSupportContract,\n type ChainDoesNotSupportContractErrorType,\n ChainMismatchError,\n type ChainMismatchErrorType,\n ChainNotFoundError,\n type ChainNotFoundErrorType,\n ClientChainNotConfiguredError,\n type ClientChainNotConfiguredErrorType,\n InvalidChainIdError,\n type InvalidChainIdErrorType,\n} from './errors/chain.js'\nexport {\n InvalidBytesBooleanError,\n type InvalidBytesBooleanErrorType,\n IntegerOutOfRangeError,\n type IntegerOutOfRangeErrorType,\n InvalidHexBooleanError,\n type InvalidHexBooleanErrorType,\n InvalidHexValueError,\n type InvalidHexValueErrorType,\n SizeOverflowError,\n type SizeOverflowErrorType,\n} from './errors/encoding.js'\nexport {\n type EnsAvatarInvalidMetadataError,\n EnsAvatarUriResolutionError,\n type EnsAvatarInvalidMetadataErrorType,\n EnsAvatarInvalidNftUriError,\n type EnsAvatarInvalidNftUriErrorType,\n EnsAvatarUnsupportedNamespaceError,\n type EnsAvatarUnsupportedNamespaceErrorType,\n type EnsAvatarUriResolutionErrorType,\n} from './errors/ens.js'\nexport {\n type InvalidDecimalNumberErrorType,\n InvalidDecimalNumberError,\n} from './errors/unit.js'\nexport {\n EstimateGasExecutionError,\n type EstimateGasExecutionErrorType,\n} from './errors/estimateGas.js'\nexport {\n ExecutionRevertedError,\n type ExecutionRevertedErrorType,\n FeeCapTooHighError,\n type FeeCapTooHighErrorType,\n FeeCapTooLowError,\n type FeeCapTooLowErrorType,\n InsufficientFundsError,\n type InsufficientFundsErrorType,\n IntrinsicGasTooHighError,\n type IntrinsicGasTooHighErrorType,\n IntrinsicGasTooLowError,\n type IntrinsicGasTooLowErrorType,\n NonceMaxValueError,\n type NonceMaxValueErrorType,\n NonceTooHighError,\n type NonceTooHighErrorType,\n NonceTooLowError,\n type NonceTooLowErrorType,\n TipAboveFeeCapError,\n type TipAboveFeeCapErrorType,\n TransactionTypeNotSupportedError,\n type TransactionTypeNotSupportedErrorType,\n UnknownNodeError,\n type UnknownNodeErrorType,\n} from './errors/node.js'\nexport {\n FilterTypeNotSupportedError,\n type FilterTypeNotSupportedErrorType,\n} from './errors/log.js'\nexport {\n HttpRequestError,\n type HttpRequestErrorType,\n RpcRequestError,\n type RpcRequestErrorType,\n TimeoutError,\n type TimeoutErrorType,\n SocketClosedError,\n type SocketClosedErrorType,\n WebSocketRequestError,\n type WebSocketRequestErrorType,\n} from './errors/request.js'\nexport {\n InvalidAddressError,\n type InvalidAddressErrorType,\n} from './errors/address.js'\nexport {\n FeeConflictError,\n type FeeConflictErrorType,\n InvalidLegacyVError,\n type InvalidLegacyVErrorType,\n InvalidSerializableTransactionError,\n type InvalidSerializableTransactionErrorType,\n InvalidSerializedTransactionError,\n type InvalidSerializedTransactionErrorType,\n InvalidSerializedTransactionTypeError,\n type InvalidSerializedTransactionTypeErrorType,\n InvalidStorageKeySizeError,\n type InvalidStorageKeySizeErrorType,\n TransactionExecutionError,\n type TransactionExecutionErrorType,\n TransactionNotFoundError,\n type TransactionNotFoundErrorType,\n TransactionReceiptNotFoundError,\n type TransactionReceiptNotFoundErrorType,\n WaitForTransactionReceiptTimeoutError,\n type WaitForTransactionReceiptTimeoutErrorType,\n} from './errors/transaction.js'\nexport {\n SizeExceedsPaddingSizeError,\n type SizeExceedsPaddingSizeErrorType,\n SliceOffsetOutOfBoundsError,\n type SliceOffsetOutOfBoundsErrorType,\n} from './errors/data.js'\nexport {\n UrlRequiredError,\n type UrlRequiredErrorType,\n} from './errors/transport.js'\nexport {\n AccountStateConflictError,\n type AccountStateConflictErrorType,\n StateAssignmentConflictError,\n type StateAssignmentConflictErrorType,\n} from './errors/stateOverride.js'\nexport type {\n AbiEventParameterToPrimitiveType,\n AbiEventParametersToPrimitiveTypes,\n AbiEventTopicToPrimitiveType,\n AbiItem,\n AbiItemArgs,\n AbiItemName,\n ContractConstructorArgs,\n ContractEventArgsFromTopics,\n EventDefinition,\n ExtractAbiFunctionForArgs,\n ExtractAbiItem,\n ExtractAbiItemForArgs,\n ExtractAbiItemNames,\n ContractErrorArgs,\n ContractErrorName,\n ContractEventArgs,\n ContractEventName,\n ContractFunctionParameters,\n ContractFunctionReturnType,\n ContractFunctionArgs,\n ContractFunctionName,\n GetEventArgs,\n GetValue,\n LogTopicType,\n MaybeAbiEventName,\n MaybeExtractEventArgsFromAbi,\n UnionWiden,\n Widen,\n} from './types/contract.js'\nexport type {\n AccessList,\n Transaction,\n TransactionBase,\n TransactionEIP1559,\n TransactionEIP2930,\n TransactionEIP4844,\n TransactionEIP7702,\n TransactionLegacy,\n TransactionReceipt,\n TransactionRequest,\n TransactionRequestBase,\n TransactionRequestEIP1559,\n TransactionRequestEIP2930,\n TransactionRequestEIP4844,\n TransactionRequestEIP7702,\n TransactionRequestGeneric,\n TransactionRequestLegacy,\n TransactionSerializable,\n TransactionSerializableBase,\n TransactionSerializableEIP1559,\n TransactionSerializableEIP2930,\n TransactionSerializableEIP4844,\n TransactionSerializableEIP7702,\n TransactionSerializableGeneric,\n TransactionSerializableLegacy,\n TransactionSerialized,\n TransactionSerializedEIP1559,\n TransactionSerializedEIP2930,\n TransactionSerializedEIP4844,\n TransactionSerializedEIP7702,\n TransactionSerializedGeneric,\n TransactionSerializedLegacy,\n TransactionType,\n} from './types/transaction.js'\nexport type {\n Assign,\n Branded,\n Evaluate,\n IsNarrowable,\n IsUndefined,\n IsUnion,\n LooseOmit,\n MaybePartial,\n MaybePromise,\n MaybeRequired,\n Mutable,\n NoInfer,\n NoUndefined,\n Omit,\n Or,\n PartialBy,\n RequiredBy,\n Some,\n UnionEvaluate,\n UnionLooseOmit,\n ValueOf,\n Prettify,\n ExactPartial,\n ExactRequired,\n IsNever,\n OneOf,\n UnionOmit,\n UnionPartialBy,\n UnionPick,\n UnionRequiredBy,\n UnionToTuple,\n} from './types/utils.js'\nexport type {\n Account,\n AccountSource,\n CustomSource,\n HDAccount,\n HDOptions,\n JsonRpcAccount,\n LocalAccount,\n PrivateKeyAccount,\n} from './accounts/types.js'\nexport type { AssetGateway, AssetGatewayUrls } from './types/ens.js'\nexport type {\n Block,\n BlockIdentifier,\n BlockNumber,\n BlockTag,\n Uncle,\n} from './types/block.js'\nexport type {\n ByteArray,\n Hash,\n Hex,\n LogTopic,\n Signature,\n CompactSignature,\n SignableMessage,\n} from './types/misc.js'\nexport type {\n AddEthereumChainParameter,\n BundlerRpcSchema,\n DebugBundlerRpcSchema,\n EIP1193EventMap,\n EIP1193Events,\n EIP1193Parameters,\n EIP1193Provider,\n EIP1193RequestFn,\n EIP1474Methods,\n ProviderRpcErrorType as EIP1193ProviderRpcErrorType,\n ProviderConnectInfo,\n ProviderMessage,\n PublicRpcSchema,\n PaymasterRpcSchema,\n NetworkSync,\n RpcSchema,\n RpcSchemaOverride,\n TestRpcSchema,\n WalletCapabilities,\n WalletCapabilitiesRecord,\n WalletCallReceipt,\n WalletGetCallsStatusReturnType,\n WalletGrantPermissionsParameters,\n WalletGrantPermissionsReturnType,\n WalletSendCallsParameters,\n WalletPermissionCaveat,\n WalletPermission,\n WalletRpcSchema,\n WatchAssetParams,\n} from './types/eip1193.js'\nexport { ProviderRpcError as EIP1193ProviderRpcError } from './types/eip1193.js'\nexport type { BlobSidecar, BlobSidecars } from './types/eip4844.js'\nexport type {\n FeeHistory,\n FeeValues,\n FeeValuesEIP1559,\n FeeValuesEIP4844,\n FeeValuesLegacy,\n FeeValuesType,\n} from './types/fee.js'\nexport type { Filter, FilterType } from './types/filter.js'\nexport type { TypedDataDefinition } from './types/typedData.js'\nexport type { GetTransportConfig, GetPollOptions } from './types/transport.js'\nexport type { Log } from './types/log.js'\nexport type {\n MulticallContracts,\n MulticallResponse,\n MulticallResults,\n} from './types/multicall.js'\nexport type {\n ParseAccount,\n DeriveAccount,\n HDKey,\n} from './types/account.js'\nexport type {\n Index,\n Quantity,\n RpcBlock,\n RpcBlockIdentifier,\n RpcBlockNumber,\n RpcFeeHistory,\n RpcFeeValues,\n RpcLog,\n RpcTransaction,\n RpcTransactionReceipt,\n RpcTransactionRequest,\n RpcUncle,\n Status,\n RpcProof,\n RpcAccountStateOverride,\n RpcStateOverride,\n RpcStateMapping,\n} from './types/rpc.js'\nexport type { Withdrawal } from './types/withdrawal.js'\nexport type {\n StateMapping,\n StateOverride,\n} from './types/stateOverride.js'\nexport { labelhash, type LabelhashErrorType } from './utils/ens/labelhash.js'\nexport { namehash, type NamehashErrorType } from './utils/ens/namehash.js'\nexport {\n type FormattedBlock,\n defineBlock,\n type DefineBlockErrorType,\n formatBlock,\n type FormatBlockErrorType,\n} from './utils/formatters/block.js'\nexport { formatLog, type FormatLogErrorType } from './utils/formatters/log.js'\nexport {\n type DecodeAbiParametersErrorType,\n type DecodeAbiParametersReturnType,\n decodeAbiParameters,\n} from './utils/abi/decodeAbiParameters.js'\nexport {\n type DecodeDeployDataErrorType,\n type DecodeDeployDataParameters,\n type DecodeDeployDataReturnType,\n decodeDeployData,\n} from './utils/abi/decodeDeployData.js'\nexport {\n type DecodeErrorResultErrorType,\n type DecodeErrorResultParameters,\n type DecodeErrorResultReturnType,\n decodeErrorResult,\n} from './utils/abi/decodeErrorResult.js'\nexport {\n type DecodeEventLogErrorType,\n type DecodeEventLogParameters,\n type DecodeEventLogReturnType,\n decodeEventLog,\n} from './utils/abi/decodeEventLog.js'\nexport {\n type DecodeFunctionDataErrorType,\n type DecodeFunctionDataParameters,\n type DecodeFunctionDataReturnType,\n decodeFunctionData,\n} from './utils/abi/decodeFunctionData.js'\nexport {\n type DecodeFunctionResultErrorType,\n type DecodeFunctionResultParameters,\n type DecodeFunctionResultReturnType,\n decodeFunctionResult,\n} from './utils/abi/decodeFunctionResult.js'\nexport {\n type EncodeAbiParametersErrorType,\n type EncodeAbiParametersReturnType,\n encodeAbiParameters,\n} from './utils/abi/encodeAbiParameters.js'\nexport {\n type EncodeDeployDataErrorType,\n type EncodeDeployDataParameters,\n type EncodeDeployDataReturnType,\n encodeDeployData,\n} from './utils/abi/encodeDeployData.js'\nexport {\n type EncodeErrorResultErrorType,\n type EncodeErrorResultParameters,\n type EncodeErrorResultReturnType,\n encodeErrorResult,\n} from './utils/abi/encodeErrorResult.js'\nexport {\n type EncodeEventTopicsErrorType,\n type EncodeEventTopicsParameters,\n type EncodeEventTopicsReturnType,\n encodeEventTopics,\n} from './utils/abi/encodeEventTopics.js'\nexport {\n type EncodeFunctionDataErrorType,\n type EncodeFunctionDataParameters,\n type EncodeFunctionDataReturnType,\n encodeFunctionData,\n} from './utils/abi/encodeFunctionData.js'\nexport {\n type PrepareEncodeFunctionDataErrorType,\n type PrepareEncodeFunctionDataParameters,\n type PrepareEncodeFunctionDataReturnType,\n prepareEncodeFunctionData,\n} from './utils/abi/prepareEncodeFunctionData.js'\nexport {\n type EncodeFunctionResultErrorType,\n type EncodeFunctionResultParameters,\n type EncodeFunctionResultReturnType,\n encodeFunctionResult,\n} from './utils/abi/encodeFunctionResult.js'\nexport {\n type ParseEventLogsErrorType,\n type ParseEventLogsParameters,\n type ParseEventLogsReturnType,\n parseEventLogs,\n} from './utils/abi/parseEventLogs.js'\nexport {\n type FormattedTransaction,\n defineTransaction,\n type DefineTransactionErrorType,\n formatTransaction,\n type FormatTransactionErrorType,\n transactionType,\n} from './utils/formatters/transaction.js'\nexport {\n type FormattedTransactionReceipt,\n defineTransactionReceipt,\n type DefineTransactionReceiptErrorType,\n formatTransactionReceipt,\n type FormatTransactionReceiptErrorType,\n} from './utils/formatters/transactionReceipt.js'\nexport {\n type FormattedTransactionRequest,\n defineTransactionRequest,\n type DefineTransactionRequestErrorType,\n formatTransactionRequest,\n type FormatTransactionRequestErrorType,\n rpcTransactionType,\n} from './utils/formatters/transactionRequest.js'\nexport {\n type GetAbiItemErrorType,\n type GetAbiItemParameters,\n type GetAbiItemReturnType,\n getAbiItem,\n} from './utils/abi/getAbiItem.js'\nexport {\n type GetContractAddressOptions,\n type GetCreate2AddressOptions,\n type GetCreate2AddressErrorType,\n type GetCreateAddressOptions,\n type GetCreateAddressErrorType,\n getContractAddress,\n getCreate2Address,\n getCreateAddress,\n} from './utils/address/getContractAddress.js'\nexport {\n type GetSerializedTransactionType,\n type GetSerializedTransactionTypeErrorType,\n getSerializedTransactionType,\n} from './utils/transaction/getSerializedTransactionType.js'\nexport {\n type GetTransactionType,\n type GetTransactionTypeErrorType,\n getTransactionType,\n} from './utils/transaction/getTransactionType.js'\nexport {\n type HashDomainErrorType,\n type HashTypedDataErrorType,\n type HashTypedDataParameters,\n type HashTypedDataReturnType,\n hashDomain,\n hashTypedData,\n} from './utils/signature/hashTypedData.js'\nexport {\n type CompactSignatureToSignatureErrorType,\n compactSignatureToSignature,\n} from './utils/signature/compactSignatureToSignature.js'\nexport {\n /** @deprecated Use `ParseCompactSignatureErrorType`. */\n type ParseCompactSignatureErrorType as HexToCompactSignatureErrorType,\n /** @deprecated Use `parseCompactSignature`. */\n parseCompactSignature as hexToCompactSignature,\n type ParseCompactSignatureErrorType,\n parseCompactSignature,\n} from './utils/signature/parseCompactSignature.js'\nexport {\n /** @deprecated Use `ParseSignatureErrorType`. */\n type ParseSignatureErrorType as HexToSignatureErrorType,\n /** @deprecated Use `parseSignature`. */\n parseSignature as hexToSignature,\n type ParseSignatureErrorType,\n parseSignature,\n} from './utils/signature/parseSignature.js'\nexport {\n type RecoverAddressErrorType,\n type RecoverAddressParameters,\n type RecoverAddressReturnType,\n recoverAddress,\n} from './utils/signature/recoverAddress.js'\nexport {\n type RecoverMessageAddressErrorType,\n type RecoverMessageAddressParameters,\n type RecoverMessageAddressReturnType,\n recoverMessageAddress,\n} from './utils/signature/recoverMessageAddress.js'\nexport {\n type RecoverPublicKeyErrorType,\n type RecoverPublicKeyParameters,\n type RecoverPublicKeyReturnType,\n recoverPublicKey,\n} from './utils/signature/recoverPublicKey.js'\nexport {\n type RecoverTransactionAddressErrorType,\n type RecoverTransactionAddressParameters,\n type RecoverTransactionAddressReturnType,\n recoverTransactionAddress,\n} from './utils/signature/recoverTransactionAddress.js'\nexport {\n type RecoverTypedDataAddressErrorType,\n type RecoverTypedDataAddressParameters,\n type RecoverTypedDataAddressReturnType,\n recoverTypedDataAddress,\n} from './utils/signature/recoverTypedDataAddress.js'\nexport {\n type SignatureToCompactSignatureErrorType,\n signatureToCompactSignature,\n} from './utils/signature/signatureToCompactSignature.js'\nexport {\n /** @deprecated Use `SignatureToHexErrorType` instead. */\n type SerializeCompactSignatureErrorType as CompactSignatureToHexErrorType,\n /** @deprecated Use `serializeCompactSignature` instead. */\n serializeCompactSignature as compactSignatureToHex,\n type SerializeCompactSignatureErrorType,\n serializeCompactSignature,\n} from './utils/signature/serializeCompactSignature.js'\nexport {\n /** @deprecated Use `SignatureToHexErrorType` instead. */\n type SerializeSignatureErrorType as SignatureToHexErrorType,\n /** @deprecated Use `serializeSignature` instead. */\n serializeSignature as signatureToHex,\n type SerializeSignatureParameters,\n type SerializeSignatureReturnType,\n type SerializeSignatureErrorType,\n serializeSignature,\n} from './utils/signature/serializeSignature.js'\nexport {\n bytesToRlp,\n type BytesToRlpErrorType,\n hexToRlp,\n type HexToRlpErrorType,\n toRlp,\n type ToRlpErrorType,\n type ToRlpReturnType,\n} from './utils/encoding/toRlp.js'\nexport {\n type VerifyHashErrorType,\n type VerifyHashParameters,\n type VerifyHashReturnType,\n verifyHash,\n} from './utils/signature/verifyHash.js'\nexport {\n type VerifyMessageErrorType,\n type VerifyMessageParameters,\n type VerifyMessageReturnType,\n verifyMessage,\n} from './utils/signature/verifyMessage.js'\nexport {\n type VerifyTypedDataErrorType,\n type VerifyTypedDataParameters,\n type VerifyTypedDataReturnType,\n verifyTypedData,\n} from './utils/signature/verifyTypedData.js'\nexport {\n type ParseErc6492SignatureErrorType,\n type ParseErc6492SignatureParameters,\n type ParseErc6492SignatureReturnType,\n parseErc6492Signature,\n} from './utils/signature/parseErc6492Signature.js'\nexport {\n type IsErc6492SignatureErrorType,\n type IsErc6492SignatureParameters,\n type IsErc6492SignatureReturnType,\n isErc6492Signature,\n} from './utils/signature/isErc6492Signature.js'\nexport {\n type SerializeErc6492SignatureErrorType,\n type SerializeErc6492SignatureParameters,\n type SerializeErc6492SignatureReturnType,\n serializeErc6492Signature,\n} from './utils/signature/serializeErc6492Signature.js'\nexport {\n type AssertRequestErrorType,\n assertRequest,\n} from './utils/transaction/assertRequest.js'\nexport {\n type AssertTransactionEIP1559ErrorType,\n assertTransactionEIP1559,\n type AssertTransactionEIP2930ErrorType,\n assertTransactionEIP2930,\n type AssertTransactionLegacyErrorType,\n assertTransactionLegacy,\n} from './utils/transaction/assertTransaction.js'\nexport {\n type BoolToBytesErrorType,\n type BoolToBytesOpts,\n boolToBytes,\n type HexToBytesErrorType,\n type HexToBytesOpts,\n hexToBytes,\n type NumberToBytesErrorType,\n numberToBytes,\n type StringToBytesErrorType,\n type StringToBytesOpts,\n stringToBytes,\n type ToBytesErrorType,\n type ToBytesParameters,\n toBytes,\n} from './utils/encoding/toBytes.js'\nexport {\n type BoolToHexErrorType,\n type BoolToHexOpts,\n boolToHex,\n type BytesToHexErrorType,\n type BytesToHexOpts,\n bytesToHex,\n type NumberToHexErrorType,\n type NumberToHexOpts,\n numberToHex,\n type StringToHexErrorType,\n type StringToHexOpts,\n stringToHex,\n type ToHexErrorType,\n type ToHexParameters,\n toHex,\n} from './utils/encoding/toHex.js'\nexport {\n type BytesToBigIntErrorType,\n type BytesToBigIntOpts,\n bytesToBigInt,\n type BytesToBoolErrorType,\n type BytesToBoolOpts,\n bytesToBool,\n type BytesToNumberErrorType,\n type BytesToNumberOpts,\n bytesToNumber,\n type BytesToStringErrorType,\n type BytesToStringOpts,\n bytesToString,\n type FromBytesErrorType,\n type FromBytesParameters,\n fromBytes,\n} from './utils/encoding/fromBytes.js'\nexport {\n type CcipRequestParameters,\n type CcipRequestErrorType,\n ccipRequest,\n /** @deprecated Use `ccipRequest`. */\n ccipRequest as ccipFetch,\n type OffchainLookupErrorType,\n offchainLookup,\n offchainLookupAbiItem,\n offchainLookupSignature,\n} from './utils/ccip.js'\nexport {\n type BlobsToCommitmentsErrorType,\n type BlobsToCommitmentsParameters,\n type BlobsToCommitmentsReturnType,\n blobsToCommitments,\n} from './utils/blob/blobsToCommitments.js'\nexport {\n type CommitmentToVersionedHashErrorType,\n type CommitmentToVersionedHashParameters,\n type CommitmentToVersionedHashReturnType,\n commitmentToVersionedHash,\n} from './utils/blob/commitmentToVersionedHash.js'\nexport {\n type CommitmentsToVersionedHashesErrorType,\n type CommitmentsToVersionedHashesParameters,\n type CommitmentsToVersionedHashesReturnType,\n commitmentsToVersionedHashes,\n} from './utils/blob/commitmentsToVersionedHashes.js'\nexport {\n type SidecarsToVersionedHashesErrorType,\n type SidecarsToVersionedHashesParameters,\n type SidecarsToVersionedHashesReturnType,\n sidecarsToVersionedHashes,\n} from './utils/blob/sidecarsToVersionedHashes.js'\nexport {\n type blobsToProofsErrorType,\n type blobsToProofsParameters,\n type blobsToProofsReturnType,\n blobsToProofs,\n} from './utils/blob/blobsToProofs.js'\nexport {\n type FromBlobsErrorType,\n type FromBlobsParameters,\n type FromBlobsReturnType,\n fromBlobs,\n} from './utils/blob/fromBlobs.js'\nexport {\n type ToBlobSidecarsErrorType,\n type ToBlobSidecarsParameters,\n type ToBlobSidecarsReturnType,\n toBlobSidecars,\n} from './utils/blob/toBlobSidecars.js'\nexport {\n type ToBlobsErrorType,\n type ToBlobsParameters,\n type ToBlobsReturnType,\n toBlobs,\n} from './utils/blob/toBlobs.js'\nexport {\n type DefineKzgErrorType,\n type DefineKzgParameters,\n type DefineKzgReturnType,\n defineKzg,\n} from './utils/kzg/defineKzg.js'\nexport {\n type SetupKzgErrorType,\n type SetupKzgParameters,\n type SetupKzgReturnType,\n setupKzg,\n} from './utils/kzg/setupKzg.js'\nexport {\n type ConcatBytesErrorType,\n type ConcatErrorType,\n type ConcatHexErrorType,\n type ConcatReturnType,\n concat,\n concatBytes,\n concatHex,\n} from './utils/data/concat.js'\nexport {\n type AssertCurrentChainErrorType,\n type AssertCurrentChainParameters,\n assertCurrentChain,\n} from './utils/chain/assertCurrentChain.js'\nexport { defineChain } from './utils/chain/defineChain.js'\nexport {\n type ExtractChainErrorType,\n type ExtractChainParameters,\n type ExtractChainReturnType,\n extractChain,\n} from './utils/chain/extractChain.js'\nexport {\n type GetChainContractAddressErrorType,\n getChainContractAddress,\n} from './utils/chain/getChainContractAddress.js'\nexport {\n type EncodePackedErrorType,\n encodePacked,\n} from './utils/abi/encodePacked.js'\nexport {\n type WithRetryErrorType,\n withRetry,\n} from './utils/promise/withRetry.js'\nexport {\n type WithTimeoutErrorType,\n withTimeout,\n} from './utils/promise/withTimeout.js'\nexport {\n type FormatEtherErrorType,\n formatEther,\n} from './utils/unit/formatEther.js'\nexport {\n type FormatGweiErrorType,\n formatGwei,\n} from './utils/unit/formatGwei.js'\nexport {\n type FormatUnitsErrorType,\n formatUnits,\n} from './utils/unit/formatUnits.js'\nexport {\n type FromHexErrorType,\n fromHex,\n type HexToBigIntErrorType,\n hexToBigInt,\n type HexToBoolErrorType,\n hexToBool,\n type HexToNumberErrorType,\n hexToNumber,\n type HexToStringErrorType,\n hexToString,\n} from './utils/encoding/fromHex.js'\nexport {\n type FromRlpErrorType,\n type FromRlpReturnType,\n fromRlp,\n} from './utils/encoding/fromRlp.js'\nexport {\n type ChecksumAddressErrorType,\n type GetAddressErrorType,\n checksumAddress,\n getAddress,\n} from './utils/address/getAddress.js'\nexport {\n type GetContractErrorReturnType,\n getContractError,\n} from './utils/errors/getContractError.js'\nexport {\n type ToEventSelectorErrorType,\n toEventSelector,\n /** @deprecated use `ToEventSelectorErrorType`. */\n type ToEventSelectorErrorType as GetEventSelectorErrorType,\n /** @deprecated use `toEventSelector`. */\n toEventSelector as getEventSelector,\n} from './utils/hash/toEventSelector.js'\nexport {\n type ToFunctionSelectorErrorType,\n toFunctionSelector,\n /** @deprecated use `ToFunctionSelectorErrorType`. */\n type ToFunctionSelectorErrorType as GetFunctionSelectorErrorType,\n /** @deprecated use `toFunctionSelector`. */\n toFunctionSelector as getFunctionSelector,\n} from './utils/hash/toFunctionSelector.js'\nexport {\n type ToEventSignatureErrorType,\n toEventSignature,\n /** @deprecated use `ToEventSignatureErrorType`. */\n type ToEventSignatureErrorType as GetEventSignatureErrorType,\n /** @deprecated use `toEventSignature`. */\n toEventSignature as getEventSignature,\n} from './utils/hash/toEventSignature.js'\nexport {\n type ToFunctionSignatureErrorType,\n toFunctionSignature,\n /** @deprecated use `ToFunctionSignatureErrorType`. */\n type ToFunctionSignatureErrorType as GetFunctionSignatureErrorType,\n /** @deprecated use `toFunctionSignature`. */\n toFunctionSignature as getFunctionSignature,\n} from './utils/hash/toFunctionSignature.js'\nexport {\n type ToEventHashErrorType,\n toEventHash,\n} from './utils/hash/toEventHash.js'\nexport {\n type ToFunctionHashErrorType,\n toFunctionHash,\n} from './utils/hash/toFunctionHash.js'\nexport {\n type HashMessageErrorType,\n hashMessage,\n} from './utils/signature/hashMessage.js'\nexport {\n type ToPrefixedMessageErrorType,\n toPrefixedMessage,\n} from './utils/signature/toPrefixedMessage.js'\nexport {\n type IsAddressOptions,\n type IsAddressErrorType,\n isAddress,\n} from './utils/address/isAddress.js'\nexport {\n type IsAddressEqualReturnType,\n type IsAddressEqualErrorType,\n isAddressEqual,\n} from './utils/address/isAddressEqual.js'\nexport { type IsBytesErrorType, isBytes } from './utils/data/isBytes.js'\nexport { type IsHashErrorType, isHash } from './utils/hash/isHash.js'\nexport { type IsHexErrorType, isHex } from './utils/data/isHex.js'\nexport {\n type Keccak256Hash,\n type Keccak256ErrorType,\n keccak256,\n} from './utils/hash/keccak256.js'\nexport {\n type Sha256Hash,\n type Sha256ErrorType,\n sha256,\n} from './utils/hash/sha256.js'\nexport {\n type Ripemd160Hash,\n type Ripemd160ErrorType,\n ripemd160,\n} from './utils/hash/ripemd160.js'\nexport {\n type PadBytesErrorType,\n type PadErrorType,\n type PadHexErrorType,\n type PadReturnType,\n pad,\n padBytes,\n padHex,\n} from './utils/data/pad.js'\nexport {\n type ParseEtherErrorType,\n parseEther,\n} from './utils/unit/parseEther.js'\nexport { type ParseGweiErrorType, parseGwei } from './utils/unit/parseGwei.js'\nexport {\n type ParseTransactionErrorType,\n type ParseTransactionReturnType,\n parseTransaction,\n} from './utils/transaction/parseTransaction.js'\nexport {\n type ParseUnitsErrorType,\n parseUnits,\n} from './utils/unit/parseUnits.js'\nexport {\n type SerializeAccessListErrorType,\n serializeAccessList,\n} from './utils/transaction/serializeAccessList.js'\nexport {\n serializeTransaction,\n type SerializeTransactionErrorType,\n type SerializedTransactionReturnType,\n type SerializeTransactionFn,\n} from './utils/transaction/serializeTransaction.js'\nexport { type SizeErrorType, size } from './utils/data/size.js'\nexport {\n type SliceBytesErrorType,\n type SliceErrorType,\n type SliceHexErrorType,\n slice,\n sliceBytes,\n sliceHex,\n} from './utils/data/slice.js'\nexport { type StringifyErrorType, stringify } from './utils/stringify.js'\nexport {\n type TrimErrorType,\n type TrimReturnType,\n trim,\n} from './utils/data/trim.js'\nexport {\n type DomainSeparatorErrorType,\n type GetTypesForEIP712DomainErrorType,\n type SerializeTypedDataErrorType,\n type ValidateTypedDataErrorType,\n serializeTypedData,\n validateTypedData,\n domainSeparator,\n getTypesForEIP712Domain,\n} from './utils/typedData.js'\nexport {\n type CreateNonceManagerParameters,\n type NonceManager,\n type NonceManagerSource,\n createNonceManager,\n nonceManager,\n} from './utils/nonceManager.js'\nexport type {\n RpcEstimateUserOperationGasReturnType,\n RpcGetUserOperationByHashReturnType,\n RpcUserOperation,\n RpcUserOperationReceipt,\n RpcUserOperationRequest,\n} from './account-abstraction/types/rpc.js'\n"],"mappings":";;;;;;;;;;AAAA;;;ACAA;;;ACAA;;;ADSO,SAAS,kBAAkB,EAAE,WAAW,MAAM,OAAO,GAAwC;AAClG,QAAM,kBAAkB;AAAA,IACtB,CAAC,EAAE,MAAM,UAAU,GAAG,EAAE,MAAM,SAAS,GAAG,EAAE,MAAM,SAAS,CAAC;AAAA,IAC5D,CAAC,YAAY,WAAW,EAAE,MAAM,GAAG,CAAC,GAAG,MAAM,MAAM;AAAA,EACrD;AAEA,SAAO;AAAA,IACL,cAAc;AAAA,IACd,MAAM;AAAA,IACN,MAAM;AAAA,MACJ;AAAA,QACE,MAAM;AAAA,QACN,OAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../ts/defineERC20Module.ts"],"sourcesContent":["import { encodeAbiParameters, stringToHex } from \"viem\";\nimport { ModuleInput } from \"@latticexyz/world/internal\";\n\nexport type DefineERC20ModuleInput = {\n namespace: string;\n name: string;\n symbol: string;\n};\n\nexport function defineERC20Module({ namespace, name, symbol }: DefineERC20ModuleInput): ModuleInput {\n const erc20ModuleArgs = encodeAbiParameters(\n [{ type: \"bytes14\" }, { type: \"string\" }, { type: \"string\" }],\n [stringToHex(namespace, { size: 14 }), name, symbol],\n );\n\n return {\n artifactPath: \"@latticexyz/world-module-erc20/out/ERC20Module.sol/ERC20Module.json\",\n root: false,\n args: [\n {\n type: \"bytes\",\n value: erc20ModuleArgs,\n },\n ],\n };\n}\n"],"mappings":"uGASO,SAASA,EAAkB,CAAE,UAAAC,EAAW,KAAAC,EAAM,OAAAC,CAAO,EAAwC,CAMlG,MAAO,CACL,aAAc,sEACd,KAAM,GACN,KAAM,CACJ,CACE,KAAM,QACN,MAXkBC,EACtB,CAAC,CAAE,KAAM,SAAU,EAAG,CAAE,KAAM,QAAS,EAAG,CAAE,KAAM,QAAS,CAAC,EAC5D,CAACC,EAAYJ,EAAW,CAAE,KAAM,EAAG,CAAC,EAAGC,EAAMC,CAAM,CACrD,CASI,CACF,CACF,CACF","names":["defineERC20Module","namespace","name","symbol","encodeAbiParameters","stringToHex"]}
@@ -1,87 +1,2 @@
1
- import {
2
- init_esm_shims
3
- } from "./chunk-M7XPBMRG.js";
4
-
5
- // mud.config.ts
6
- init_esm_shims();
7
- import { defineStore } from "@latticexyz/store";
8
- var mud_config_default = defineStore({
9
- userTypes: {
10
- ResourceId: { filePath: "@latticexyz/store/src/ResourceId.sol", type: "bytes32" }
11
- },
12
- tables: {
13
- Owner: {
14
- schema: {
15
- value: "address"
16
- },
17
- key: [],
18
- codegen: {
19
- tableIdArgument: true
20
- }
21
- },
22
- ERC20Metadata: {
23
- schema: {
24
- decimals: "uint8",
25
- name: "string",
26
- symbol: "string"
27
- },
28
- key: [],
29
- codegen: {
30
- tableIdArgument: true
31
- }
32
- },
33
- TotalSupply: {
34
- schema: {
35
- totalSupply: "uint256"
36
- },
37
- key: [],
38
- codegen: {
39
- tableIdArgument: true
40
- }
41
- },
42
- Balances: {
43
- schema: {
44
- account: "address",
45
- value: "uint256"
46
- },
47
- key: ["account"],
48
- codegen: {
49
- tableIdArgument: true
50
- }
51
- },
52
- Allowances: {
53
- schema: {
54
- account: "address",
55
- spender: "address",
56
- value: "uint256"
57
- },
58
- key: ["account", "spender"],
59
- codegen: {
60
- tableIdArgument: true
61
- }
62
- },
63
- Paused: {
64
- schema: {
65
- paused: "bool"
66
- },
67
- key: [],
68
- codegen: {
69
- tableIdArgument: true
70
- }
71
- },
72
- ERC20Registry: {
73
- schema: {
74
- namespaceId: "ResourceId",
75
- tokenAddress: "address"
76
- },
77
- key: ["namespaceId"],
78
- codegen: {
79
- tableIdArgument: true
80
- }
81
- }
82
- }
83
- });
84
- export {
85
- mud_config_default as default
86
- };
1
+ import"./chunk-LURIOADG.js";import{defineStore as e}from"@latticexyz/store";var a=e({userTypes:{ResourceId:{filePath:"@latticexyz/store/src/ResourceId.sol",type:"bytes32"}},tables:{Owner:{schema:{value:"address"},key:[],codegen:{tableIdArgument:!0}},ERC20Metadata:{schema:{decimals:"uint8",name:"string",symbol:"string"},key:[],codegen:{tableIdArgument:!0}},TotalSupply:{schema:{totalSupply:"uint256"},key:[],codegen:{tableIdArgument:!0}},Balances:{schema:{account:"address",value:"uint256"},key:["account"],codegen:{tableIdArgument:!0}},Allowances:{schema:{account:"address",spender:"address",value:"uint256"},key:["account","spender"],codegen:{tableIdArgument:!0}},Paused:{schema:{paused:"bool"},key:[],codegen:{tableIdArgument:!0}},ERC20Registry:{schema:{namespaceId:"ResourceId",tokenAddress:"address"},key:["namespaceId"],codegen:{tableIdArgument:!0}}}});export{a as default};
87
2
  //# sourceMappingURL=mud.config.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../mud.config.ts"],"sourcesContent":["import { defineStore } from \"@latticexyz/store\";\n\n// Used for tablegen\nexport default defineStore({\n userTypes: {\n ResourceId: { filePath: \"@latticexyz/store/src/ResourceId.sol\", type: \"bytes32\" },\n },\n tables: {\n Owner: {\n schema: {\n value: \"address\",\n },\n key: [],\n codegen: {\n tableIdArgument: true,\n },\n },\n ERC20Metadata: {\n schema: {\n decimals: \"uint8\",\n name: \"string\",\n symbol: \"string\",\n },\n key: [],\n codegen: {\n tableIdArgument: true,\n },\n },\n TotalSupply: {\n schema: {\n totalSupply: \"uint256\",\n },\n key: [],\n codegen: {\n tableIdArgument: true,\n },\n },\n Balances: {\n schema: {\n account: \"address\",\n value: \"uint256\",\n },\n key: [\"account\"],\n codegen: {\n tableIdArgument: true,\n },\n },\n Allowances: {\n schema: {\n account: \"address\",\n spender: \"address\",\n value: \"uint256\",\n },\n key: [\"account\", \"spender\"],\n codegen: {\n tableIdArgument: true,\n },\n },\n Paused: {\n schema: {\n paused: \"bool\",\n },\n key: [],\n codegen: {\n tableIdArgument: true,\n },\n },\n ERC20Registry: {\n schema: {\n namespaceId: \"ResourceId\",\n tokenAddress: \"address\",\n },\n key: [\"namespaceId\"],\n codegen: {\n tableIdArgument: true,\n },\n },\n },\n});\n"],"mappings":";;;;;AAAA;AAAA,SAAS,mBAAmB;AAG5B,IAAO,qBAAQ,YAAY;AAAA,EACzB,WAAW;AAAA,IACT,YAAY,EAAE,UAAU,wCAAwC,MAAM,UAAU;AAAA,EAClF;AAAA,EACA,QAAQ;AAAA,IACN,OAAO;AAAA,MACL,QAAQ;AAAA,QACN,OAAO;AAAA,MACT;AAAA,MACA,KAAK,CAAC;AAAA,MACN,SAAS;AAAA,QACP,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb,QAAQ;AAAA,QACN,UAAU;AAAA,QACV,MAAM;AAAA,QACN,QAAQ;AAAA,MACV;AAAA,MACA,KAAK,CAAC;AAAA,MACN,SAAS;AAAA,QACP,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,aAAa;AAAA,MACX,QAAQ;AAAA,QACN,aAAa;AAAA,MACf;AAAA,MACA,KAAK,CAAC;AAAA,MACN,SAAS;AAAA,QACP,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR,QAAQ;AAAA,QACN,SAAS;AAAA,QACT,OAAO;AAAA,MACT;AAAA,MACA,KAAK,CAAC,SAAS;AAAA,MACf,SAAS;AAAA,QACP,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,YAAY;AAAA,MACV,QAAQ;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,QACT,OAAO;AAAA,MACT;AAAA,MACA,KAAK,CAAC,WAAW,SAAS;AAAA,MAC1B,SAAS;AAAA,QACP,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,QAAQ;AAAA,MACN,QAAQ;AAAA,QACN,QAAQ;AAAA,MACV;AAAA,MACA,KAAK,CAAC;AAAA,MACN,SAAS;AAAA,QACP,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb,QAAQ;AAAA,QACN,aAAa;AAAA,QACb,cAAc;AAAA,MAChB;AAAA,MACA,KAAK,CAAC,aAAa;AAAA,MACnB,SAAS;AAAA,QACP,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,EACF;AACF,CAAC;","names":[]}
1
+ {"version":3,"sources":["../mud.config.ts"],"sourcesContent":["import { defineStore } from \"@latticexyz/store\";\n\n// Used for tablegen\nexport default defineStore({\n userTypes: {\n ResourceId: { filePath: \"@latticexyz/store/src/ResourceId.sol\", type: \"bytes32\" },\n },\n tables: {\n Owner: {\n schema: {\n value: \"address\",\n },\n key: [],\n codegen: {\n tableIdArgument: true,\n },\n },\n ERC20Metadata: {\n schema: {\n decimals: \"uint8\",\n name: \"string\",\n symbol: \"string\",\n },\n key: [],\n codegen: {\n tableIdArgument: true,\n },\n },\n TotalSupply: {\n schema: {\n totalSupply: \"uint256\",\n },\n key: [],\n codegen: {\n tableIdArgument: true,\n },\n },\n Balances: {\n schema: {\n account: \"address\",\n value: \"uint256\",\n },\n key: [\"account\"],\n codegen: {\n tableIdArgument: true,\n },\n },\n Allowances: {\n schema: {\n account: \"address\",\n spender: \"address\",\n value: \"uint256\",\n },\n key: [\"account\", \"spender\"],\n codegen: {\n tableIdArgument: true,\n },\n },\n Paused: {\n schema: {\n paused: \"bool\",\n },\n key: [],\n codegen: {\n tableIdArgument: true,\n },\n },\n ERC20Registry: {\n schema: {\n namespaceId: \"ResourceId\",\n tokenAddress: \"address\",\n },\n key: [\"namespaceId\"],\n codegen: {\n tableIdArgument: true,\n },\n },\n },\n});\n"],"mappings":"4BAAA,OAAS,eAAAA,MAAmB,oBAG5B,IAAOC,EAAQD,EAAY,CACzB,UAAW,CACT,WAAY,CAAE,SAAU,uCAAwC,KAAM,SAAU,CAClF,EACA,OAAQ,CACN,MAAO,CACL,OAAQ,CACN,MAAO,SACT,EACA,IAAK,CAAC,EACN,QAAS,CACP,gBAAiB,EACnB,CACF,EACA,cAAe,CACb,OAAQ,CACN,SAAU,QACV,KAAM,SACN,OAAQ,QACV,EACA,IAAK,CAAC,EACN,QAAS,CACP,gBAAiB,EACnB,CACF,EACA,YAAa,CACX,OAAQ,CACN,YAAa,SACf,EACA,IAAK,CAAC,EACN,QAAS,CACP,gBAAiB,EACnB,CACF,EACA,SAAU,CACR,OAAQ,CACN,QAAS,UACT,MAAO,SACT,EACA,IAAK,CAAC,SAAS,EACf,QAAS,CACP,gBAAiB,EACnB,CACF,EACA,WAAY,CACV,OAAQ,CACN,QAAS,UACT,QAAS,UACT,MAAO,SACT,EACA,IAAK,CAAC,UAAW,SAAS,EAC1B,QAAS,CACP,gBAAiB,EACnB,CACF,EACA,OAAQ,CACN,OAAQ,CACN,OAAQ,MACV,EACA,IAAK,CAAC,EACN,QAAS,CACP,gBAAiB,EACnB,CACF,EACA,cAAe,CACb,OAAQ,CACN,YAAa,aACb,aAAc,SAChB,EACA,IAAK,CAAC,aAAa,EACnB,QAAS,CACP,gBAAiB,EACnB,CACF,CACF,CACF,CAAC","names":["defineStore","mud_config_default"]}
@@ -0,0 +1,22 @@
1
+ import{b as ye,c as xe,d as xt,e as Ee,g as Nt,h as G,k as Rt,l as Be,m as Lt,n as ve,p as Ht}from"./chunk-TJJDXMQ6.js";import{c as Qe}from"./chunk-LURIOADG.js";function Je(t,e,n,r){if(typeof t.setBigUint64=="function")return t.setBigUint64(e,n,r);let s=BigInt(32),o=BigInt(4294967295),c=Number(n>>s&o),f=Number(n&o),i=r?4:0,a=r?0:4;t.setUint32(e+i,c,r),t.setUint32(e+a,f,r)}var Se=(t,e,n)=>t&e^~t&n,Ae=(t,e,n)=>t&e^t&n^e&n,Ut=class extends Lt{constructor(e,n,r,s){super(),this.blockLen=e,this.outputLen=n,this.padOffset=r,this.isLE=s,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Nt(this.buffer)}update(e){xt(this);let{view:n,buffer:r,blockLen:s}=this;e=Rt(e);let o=e.length;for(let c=0;c<o;){let f=Math.min(s-this.pos,o-c);if(f===s){let i=Nt(e);for(;s<=o-c;c+=s)this.process(i,c);continue}r.set(e.subarray(c,c+f),this.pos),this.pos+=f,c+=f,this.pos===s&&(this.process(n,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){xt(this),Ee(e,this),this.finished=!0;let{buffer:n,view:r,blockLen:s,isLE:o}=this,{pos:c}=this;n[c++]=128,this.buffer.subarray(c).fill(0),this.padOffset>s-c&&(this.process(r,0),c=0);for(let d=c;d<s;d++)n[d]=0;Je(r,s-8,BigInt(this.length*8),o),this.process(r,0);let f=Nt(e),i=this.outputLen;if(i%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let a=i/4,h=this.get();if(a>h.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<a;d++)f.setUint32(4*d,h[d],o)}digest(){let{buffer:e,outputLen:n}=this;this.digestInto(e);let r=e.slice(0,n);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:n,buffer:r,length:s,finished:o,destroyed:c,pos:f}=this;return e.length=s,e.pos=f,e.finished=o,e.destroyed=c,s%n&&e.buffer.set(r),e}};var Fe=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),st=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),it=new Uint32Array(64),Xt=class extends Ut{constructor(){super(64,32,8,!1),this.A=st[0]|0,this.B=st[1]|0,this.C=st[2]|0,this.D=st[3]|0,this.E=st[4]|0,this.F=st[5]|0,this.G=st[6]|0,this.H=st[7]|0}get(){let{A:e,B:n,C:r,D:s,E:o,F:c,G:f,H:i}=this;return[e,n,r,s,o,c,f,i]}set(e,n,r,s,o,c,f,i){this.A=e|0,this.B=n|0,this.C=r|0,this.D=s|0,this.E=o|0,this.F=c|0,this.G=f|0,this.H=i|0}process(e,n){for(let d=0;d<16;d++,n+=4)it[d]=e.getUint32(n,!1);for(let d=16;d<64;d++){let l=it[d-15],p=it[d-2],_=G(l,7)^G(l,18)^l>>>3,b=G(p,17)^G(p,19)^p>>>10;it[d]=b+it[d-7]+_+it[d-16]|0}let{A:r,B:s,C:o,D:c,E:f,F:i,G:a,H:h}=this;for(let d=0;d<64;d++){let l=G(f,6)^G(f,11)^G(f,25),p=h+l+Se(f,i,a)+Fe[d]+it[d]|0,b=(G(r,2)^G(r,13)^G(r,22))+Ae(r,s,o)|0;h=a,a=i,i=f,f=c+p|0,c=o,o=s,s=r,r=p+b|0}r=r+this.A|0,s=s+this.B|0,o=o+this.C|0,c=c+this.D|0,f=f+this.E|0,i=i+this.F|0,a=a+this.G|0,h=h+this.H|0,this.set(r,s,o,c,f,i,a,h)}roundClean(){it.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var vt=ve(()=>new Xt);var Ct=class extends Lt{constructor(e,n){super(),this.finished=!1,this.destroyed=!1,xe(e);let r=Rt(n);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let s=this.blockLen,o=new Uint8Array(s);o.set(r.length>s?e.create().update(r).digest():r);for(let c=0;c<o.length;c++)o[c]^=54;this.iHash.update(o),this.oHash=e.create();for(let c=0;c<o.length;c++)o[c]^=106;this.oHash.update(o),o.fill(0)}update(e){return xt(this),this.iHash.update(e),this}digestInto(e){xt(this),ye(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:n,iHash:r,finished:s,destroyed:o,blockLen:c,outputLen:f}=this;return e=e,e.finished=s,e.destroyed=o,e.blockLen=c,e.outputLen=f,e.oHash=n._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},Qt=(t,e,n)=>new Ct(t,e).update(n).digest();Qt.create=(t,e)=>new Ct(t,e);var oe={};Qe(oe,{aInRange:()=>J,abool:()=>ht,abytes:()=>D,bitGet:()=>on,bitLen:()=>ne,bitMask:()=>At,bitSet:()=>sn,bytesToHex:()=>gt,bytesToNumberBE:()=>j,bytesToNumberLE:()=>kt,concatBytes:()=>Z,createHmacDrbg:()=>re,ensureBytes:()=>C,equalBytes:()=>rn,hexToBytes:()=>wt,hexToNumber:()=>ee,inRange:()=>ft,isBytes:()=>ct,memoized:()=>Vt,notImplemented:()=>fn,numberToBytesBE:()=>W,numberToBytesLE:()=>Zt,numberToHexUnpadded:()=>mt,numberToVarBytesBE:()=>nn,utf8ToBytes:()=>St,validateObject:()=>F});var te=BigInt(0),$t=BigInt(1),tn=BigInt(2);function ct(t){return t instanceof Uint8Array||t!=null&&typeof t=="object"&&t.constructor.name==="Uint8Array"}function D(t){if(!ct(t))throw new Error("Uint8Array expected")}function ht(t,e){if(typeof e!="boolean")throw new Error(`${t} must be valid boolean, got "${e}".`)}var en=Array.from({length:256},(t,e)=>e.toString(16).padStart(2,"0"));function gt(t){D(t);let e="";for(let n=0;n<t.length;n++)e+=en[t[n]];return e}function mt(t){let e=t.toString(16);return e.length&1?`0${e}`:e}function ee(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);return BigInt(t===""?"0":`0x${t}`)}var tt={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};function Ie(t){if(t>=tt._0&&t<=tt._9)return t-tt._0;if(t>=tt._A&&t<=tt._F)return t-(tt._A-10);if(t>=tt._a&&t<=tt._f)return t-(tt._a-10)}function wt(t){if(typeof t!="string")throw new Error("hex string expected, got "+typeof t);let e=t.length,n=e/2;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);let r=new Uint8Array(n);for(let s=0,o=0;s<n;s++,o+=2){let c=Ie(t.charCodeAt(o)),f=Ie(t.charCodeAt(o+1));if(c===void 0||f===void 0){let i=t[o]+t[o+1];throw new Error('hex string expected, got non-hex character "'+i+'" at index '+o)}r[s]=c*16+f}return r}function j(t){return ee(gt(t))}function kt(t){return D(t),ee(gt(Uint8Array.from(t).reverse()))}function W(t,e){return wt(t.toString(16).padStart(e*2,"0"))}function Zt(t,e){return W(t,e).reverse()}function nn(t){return wt(mt(t))}function C(t,e,n){let r;if(typeof e=="string")try{r=wt(e)}catch(o){throw new Error(`${t} must be valid hex string, got "${e}". Cause: ${o}`)}else if(ct(e))r=Uint8Array.from(e);else throw new Error(`${t} must be hex string or Uint8Array`);let s=r.length;if(typeof n=="number"&&s!==n)throw new Error(`${t} expected ${n} bytes, got ${s}`);return r}function Z(...t){let e=0;for(let r=0;r<t.length;r++){let s=t[r];D(s),e+=s.length}let n=new Uint8Array(e);for(let r=0,s=0;r<t.length;r++){let o=t[r];n.set(o,s),s+=o.length}return n}function rn(t,e){if(t.length!==e.length)return!1;let n=0;for(let r=0;r<t.length;r++)n|=t[r]^e[r];return n===0}function St(t){if(typeof t!="string")throw new Error(`utf8ToBytes expected string, got ${typeof t}`);return new Uint8Array(new TextEncoder().encode(t))}var Jt=t=>typeof t=="bigint"&&te<=t;function ft(t,e,n){return Jt(t)&&Jt(e)&&Jt(n)&&e<=t&&t<n}function J(t,e,n,r){if(!ft(e,n,r))throw new Error(`expected valid ${t}: ${n} <= n < ${r}, got ${typeof e} ${e}`)}function ne(t){let e;for(e=0;t>te;t>>=$t,e+=1);return e}function on(t,e){return t>>BigInt(e)&$t}function sn(t,e,n){return t|(n?$t:te)<<BigInt(e)}var At=t=>(tn<<BigInt(t-1))-$t,Ft=t=>new Uint8Array(t),_e=t=>Uint8Array.from(t);function re(t,e,n){if(typeof t!="number"||t<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof n!="function")throw new Error("hmacFn must be a function");let r=Ft(t),s=Ft(t),o=0,c=()=>{r.fill(1),s.fill(0),o=0},f=(...d)=>n(s,r,...d),i=(d=Ft())=>{s=f(_e([0]),d),r=f(),d.length!==0&&(s=f(_e([1]),d),r=f())},a=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let d=0,l=[];for(;d<e;){r=f();let p=r.slice();l.push(p),d+=r.length}return Z(...l)};return(d,l)=>{c(),i(d);let p;for(;!(p=l(a()));)i();return c(),p}}var cn={bigint:t=>typeof t=="bigint",function:t=>typeof t=="function",boolean:t=>typeof t=="boolean",string:t=>typeof t=="string",stringOrUint8Array:t=>typeof t=="string"||ct(t),isSafeInteger:t=>Number.isSafeInteger(t),array:t=>Array.isArray(t),field:(t,e)=>e.Fp.isValid(t),hash:t=>typeof t=="function"&&Number.isSafeInteger(t.outputLen)};function F(t,e,n={}){let r=(s,o,c)=>{let f=cn[o];if(typeof f!="function")throw new Error(`Invalid validator "${o}", expected function`);let i=t[s];if(!(c&&i===void 0)&&!f(i,t))throw new Error(`Invalid param ${String(s)}=${i} (${typeof i}), expected ${o}`)};for(let[s,o]of Object.entries(e))r(s,o,!1);for(let[s,o]of Object.entries(n))r(s,o,!0);return t}var fn=()=>{throw new Error("not implemented")};function Vt(t){let e=new WeakMap;return(n,...r)=>{let s=e.get(n);if(s!==void 0)return s;let o=t(n,...r);return e.set(n,o),o}}var $=BigInt(0),H=BigInt(1),bt=BigInt(2),an=BigInt(3),se=BigInt(4),Oe=BigInt(5),qe=BigInt(8),un=BigInt(9),dn=BigInt(16);function U(t,e){let n=t%e;return n>=$?n:e+n}function ln(t,e,n){if(n<=$||e<$)throw new Error("Expected power/modulo > 0");if(n===H)return $;let r=H;for(;e>$;)e&H&&(r=r*t%n),t=t*t%n,e>>=H;return r}function P(t,e,n){let r=t;for(;e-- >$;)r*=r,r%=n;return r}function zt(t,e){if(t===$||e<=$)throw new Error(`invert: expected positive integers, got n=${t} mod=${e}`);let n=U(t,e),r=e,s=$,o=H,c=H,f=$;for(;n!==$;){let a=r/n,h=r%n,d=s-c*a,l=o-f*a;r=n,n=h,s=c,o=f,c=d,f=l}if(r!==H)throw new Error("invert: does not exist");return U(s,e)}function hn(t){let e=(t-H)/bt,n,r,s;for(n=t-H,r=0;n%bt===$;n/=bt,r++);for(s=bt;s<t&&ln(s,e,t)!==t-H;s++);if(r===1){let c=(t+H)/se;return function(i,a){let h=i.pow(a,c);if(!i.eql(i.sqr(h),a))throw new Error("Cannot find square root");return h}}let o=(n+H)/bt;return function(f,i){if(f.pow(i,e)===f.neg(f.ONE))throw new Error("Cannot find square root");let a=r,h=f.pow(f.mul(f.ONE,s),n),d=f.pow(i,o),l=f.pow(i,n);for(;!f.eql(l,f.ONE);){if(f.eql(l,f.ZERO))return f.ZERO;let p=1;for(let b=f.sqr(l);p<a&&!f.eql(b,f.ONE);p++)b=f.sqr(b);let _=f.pow(h,H<<BigInt(a-p-1));h=f.sqr(_),d=f.mul(d,_),l=f.mul(l,h),a=p}return d}}function gn(t){if(t%se===an){let e=(t+H)/se;return function(r,s){let o=r.pow(s,e);if(!r.eql(r.sqr(o),s))throw new Error("Cannot find square root");return o}}if(t%qe===Oe){let e=(t-Oe)/qe;return function(r,s){let o=r.mul(s,bt),c=r.pow(o,e),f=r.mul(s,c),i=r.mul(r.mul(f,bt),c),a=r.mul(f,r.sub(i,r.ONE));if(!r.eql(r.sqr(a),s))throw new Error("Cannot find square root");return a}}return t%dn,hn(t)}var mn=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function jt(t){let e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=mn.reduce((r,s)=>(r[s]="function",r),e);return F(t,n)}function wn(t,e,n){if(n<$)throw new Error("Expected power > 0");if(n===$)return t.ONE;if(n===H)return e;let r=t.ONE,s=e;for(;n>$;)n&H&&(r=t.mul(r,s)),s=t.sqr(s),n>>=H;return r}function bn(t,e){let n=new Array(e.length),r=e.reduce((o,c,f)=>t.is0(c)?o:(n[f]=o,t.mul(o,c)),t.ONE),s=t.inv(r);return e.reduceRight((o,c,f)=>t.is0(c)?o:(n[f]=t.mul(o,n[f]),t.mul(o,c)),s),n}function ie(t,e){let n=e!==void 0?e:t.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function Mt(t,e,n=!1,r={}){if(t<=$)throw new Error(`Expected Field ORDER > 0, got ${t}`);let{nBitLength:s,nByteLength:o}=ie(t,e);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");let c=gn(t),f=Object.freeze({ORDER:t,BITS:s,BYTES:o,MASK:At(s),ZERO:$,ONE:H,create:i=>U(i,t),isValid:i=>{if(typeof i!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof i}`);return $<=i&&i<t},is0:i=>i===$,isOdd:i=>(i&H)===H,neg:i=>U(-i,t),eql:(i,a)=>i===a,sqr:i=>U(i*i,t),add:(i,a)=>U(i+a,t),sub:(i,a)=>U(i-a,t),mul:(i,a)=>U(i*a,t),pow:(i,a)=>wn(f,i,a),div:(i,a)=>U(i*zt(a,t),t),sqrN:i=>i*i,addN:(i,a)=>i+a,subN:(i,a)=>i-a,mulN:(i,a)=>i*a,inv:i=>zt(i,t),sqrt:r.sqrt||(i=>c(f,i)),invertBatch:i=>bn(f,i),cmov:(i,a,h)=>h?a:i,toBytes:i=>n?Zt(i,o):W(i,o),fromBytes:i=>{if(i.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${i.length}`);return n?kt(i):j(i)}});return Object.freeze(f)}function Te(t){if(typeof t!="bigint")throw new Error("field order must be bigint");let e=t.toString(2).length;return Math.ceil(e/8)}function ce(t){let e=Te(t);return e+Math.ceil(e/2)}function Ne(t,e,n=!1){let r=t.length,s=Te(e),o=ce(e);if(r<16||r<o||r>1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);let c=n?j(t):kt(t),f=U(c,e-H)+H;return n?Zt(f,s):W(f,s)}var yn=BigInt(0),fe=BigInt(1),ae=new WeakMap,Re=new WeakMap;function Le(t,e){let n=(o,c)=>{let f=c.negate();return o?f:c},r=o=>{if(!Number.isSafeInteger(o)||o<=0||o>e)throw new Error(`Wrong window size=${o}, should be [1..${e}]`)},s=o=>{r(o);let c=Math.ceil(e/o)+1,f=2**(o-1);return{windows:c,windowSize:f}};return{constTimeNegate:n,unsafeLadder(o,c){let f=t.ZERO,i=o;for(;c>yn;)c&fe&&(f=f.add(i)),i=i.double(),c>>=fe;return f},precomputeWindow(o,c){let{windows:f,windowSize:i}=s(c),a=[],h=o,d=h;for(let l=0;l<f;l++){d=h,a.push(d);for(let p=1;p<i;p++)d=d.add(h),a.push(d);h=d.double()}return a},wNAF(o,c,f){let{windows:i,windowSize:a}=s(o),h=t.ZERO,d=t.BASE,l=BigInt(2**o-1),p=2**o,_=BigInt(o);for(let b=0;b<i;b++){let u=b*a,g=Number(f&l);f>>=_,g>a&&(g-=p,f+=fe);let m=u,y=u+Math.abs(g)-1,B=b%2!==0,q=g<0;g===0?d=d.add(n(B,c[m])):h=h.add(n(q,c[y]))}return{p:h,f:d}},wNAFCached(o,c,f){let i=Re.get(o)||1,a=ae.get(o);return a||(a=this.precomputeWindow(o,i),i!==1&&ae.set(o,f(a))),this.wNAF(i,a,c)},setWindowSize(o,c){r(c),Re.set(o,c),ae.delete(o)}}}function He(t,e,n,r){if(!Array.isArray(n)||!Array.isArray(r)||r.length!==n.length)throw new Error("arrays of points and scalars must have equal length");r.forEach((h,d)=>{if(!e.isValid(h))throw new Error(`wrong scalar at index ${d}`)}),n.forEach((h,d)=>{if(!(h instanceof t))throw new Error(`wrong point at index ${d}`)});let s=ne(BigInt(n.length)),o=s>12?s-3:s>4?s-2:s?2:1,c=(1<<o)-1,f=new Array(c+1).fill(t.ZERO),i=Math.floor((e.BITS-1)/o)*o,a=t.ZERO;for(let h=i;h>=0;h-=o){f.fill(t.ZERO);for(let l=0;l<r.length;l++){let p=r[l],_=Number(p>>BigInt(h)&BigInt(c));f[_]=f[_].add(n[l])}let d=t.ZERO;for(let l=f.length-1,p=t.ZERO;l>0;l--)p=p.add(f[l]),d=d.add(p);if(a=a.add(d),h!==0)for(let l=0;l<o;l++)a=a.double()}return a}function ue(t){return jt(t.Fp),F(t,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...ie(t.n,t.nBitLength),...t,p:t.Fp.ORDER})}function Ue(t){t.lowS!==void 0&&ht("lowS",t.lowS),t.prehash!==void 0&&ht("prehash",t.prehash)}function xn(t){let e=ue(t);F(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:n,Fp:r,a:s}=e;if(n){if(!r.eql(s,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}var{bytesToNumberBE:En,hexToBytes:Bn}=oe,et={Err:class extends Error{constructor(e=""){super(e)}},_tlv:{encode:(t,e)=>{let{Err:n}=et;if(t<0||t>256)throw new n("tlv.encode: wrong tag");if(e.length&1)throw new n("tlv.encode: unpadded data");let r=e.length/2,s=mt(r);if(s.length/2&128)throw new n("tlv.encode: long form length too big");let o=r>127?mt(s.length/2|128):"";return`${mt(t)}${o}${s}${e}`},decode(t,e){let{Err:n}=et,r=0;if(t<0||t>256)throw new n("tlv.encode: wrong tag");if(e.length<2||e[r++]!==t)throw new n("tlv.decode: wrong tlv");let s=e[r++],o=!!(s&128),c=0;if(!o)c=s;else{let i=s&127;if(!i)throw new n("tlv.decode(long): indefinite length not supported");if(i>4)throw new n("tlv.decode(long): byte length is too big");let a=e.subarray(r,r+i);if(a.length!==i)throw new n("tlv.decode: length bytes not complete");if(a[0]===0)throw new n("tlv.decode(long): zero leftmost byte");for(let h of a)c=c<<8|h;if(r+=i,c<128)throw new n("tlv.decode(long): not minimal encoding")}let f=e.subarray(r,r+c);if(f.length!==c)throw new n("tlv.decode: wrong value length");return{v:f,l:e.subarray(r+c)}}},_int:{encode(t){let{Err:e}=et;if(t<X)throw new e("integer: negative integers are not allowed");let n=mt(t);if(Number.parseInt(n[0],16)&8&&(n="00"+n),n.length&1)throw new e("unexpected assertion");return n},decode(t){let{Err:e}=et;if(t[0]&128)throw new e("Invalid signature integer: negative");if(t[0]===0&&!(t[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return En(t)}},toSig(t){let{Err:e,_int:n,_tlv:r}=et,s=typeof t=="string"?Bn(t):t;D(s);let{v:o,l:c}=r.decode(48,s);if(c.length)throw new e("Invalid signature: left bytes after parsing");let{v:f,l:i}=r.decode(2,o),{v:a,l:h}=r.decode(2,i);if(h.length)throw new e("Invalid signature: left bytes after parsing");return{r:n.decode(f),s:n.decode(a)}},hexFromSig(t){let{_tlv:e,_int:n}=et,r=`${e.encode(2,n.encode(t.r))}${e.encode(2,n.encode(t.s))}`;return e.encode(48,r)}},X=BigInt(0),N=BigInt(1),at=BigInt(2),Pt=BigInt(3),Ce=BigInt(4);function vn(t){let e=xn(t),{Fp:n}=e,r=Mt(e.n,e.nBitLength),s=e.toBytes||((b,u,g)=>{let m=u.toAffine();return Z(Uint8Array.from([4]),n.toBytes(m.x),n.toBytes(m.y))}),o=e.fromBytes||(b=>{let u=b.subarray(1),g=n.fromBytes(u.subarray(0,n.BYTES)),m=n.fromBytes(u.subarray(n.BYTES,2*n.BYTES));return{x:g,y:m}});function c(b){let{a:u,b:g}=e,m=n.sqr(b),y=n.mul(m,b);return n.add(n.add(y,n.mul(b,u)),g)}if(!n.eql(n.sqr(e.Gy),c(e.Gx)))throw new Error("bad generator point: equation left != right");function f(b){return ft(b,N,e.n)}function i(b){let{allowedPrivateKeyLengths:u,nByteLength:g,wrapPrivateKey:m,n:y}=e;if(u&&typeof b!="bigint"){if(ct(b)&&(b=gt(b)),typeof b!="string"||!u.includes(b.length))throw new Error("Invalid key");b=b.padStart(g*2,"0")}let B;try{B=typeof b=="bigint"?b:j(C("private key",b,g))}catch{throw new Error(`private key must be ${g} bytes, hex or bigint, not ${typeof b}`)}return m&&(B=U(B,y)),J("private key",B,N,y),B}function a(b){if(!(b instanceof l))throw new Error("ProjectivePoint expected")}let h=Vt((b,u)=>{let{px:g,py:m,pz:y}=b;if(n.eql(y,n.ONE))return{x:g,y:m};let B=b.is0();u==null&&(u=B?n.ONE:n.inv(y));let q=n.mul(g,u),A=n.mul(m,u),v=n.mul(y,u);if(B)return{x:n.ZERO,y:n.ZERO};if(!n.eql(v,n.ONE))throw new Error("invZ was invalid");return{x:q,y:A}}),d=Vt(b=>{if(b.is0()){if(e.allowInfinityPoint&&!n.is0(b.py))return;throw new Error("bad point: ZERO")}let{x:u,y:g}=b.toAffine();if(!n.isValid(u)||!n.isValid(g))throw new Error("bad point: x or y not FE");let m=n.sqr(g),y=c(u);if(!n.eql(m,y))throw new Error("bad point: equation left != right");if(!b.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0});class l{constructor(u,g,m){if(this.px=u,this.py=g,this.pz=m,u==null||!n.isValid(u))throw new Error("x required");if(g==null||!n.isValid(g))throw new Error("y required");if(m==null||!n.isValid(m))throw new Error("z required");Object.freeze(this)}static fromAffine(u){let{x:g,y:m}=u||{};if(!u||!n.isValid(g)||!n.isValid(m))throw new Error("invalid affine point");if(u instanceof l)throw new Error("projective point not allowed");let y=B=>n.eql(B,n.ZERO);return y(g)&&y(m)?l.ZERO:new l(g,m,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(u){let g=n.invertBatch(u.map(m=>m.pz));return u.map((m,y)=>m.toAffine(g[y])).map(l.fromAffine)}static fromHex(u){let g=l.fromAffine(o(C("pointHex",u)));return g.assertValidity(),g}static fromPrivateKey(u){return l.BASE.multiply(i(u))}static msm(u,g){return He(l,r,u,g)}_setWindowSize(u){_.setWindowSize(this,u)}assertValidity(){d(this)}hasEvenY(){let{y:u}=this.toAffine();if(n.isOdd)return!n.isOdd(u);throw new Error("Field doesn't support isOdd")}equals(u){a(u);let{px:g,py:m,pz:y}=this,{px:B,py:q,pz:A}=u,v=n.eql(n.mul(g,A),n.mul(B,y)),S=n.eql(n.mul(m,A),n.mul(q,y));return v&&S}negate(){return new l(this.px,n.neg(this.py),this.pz)}double(){let{a:u,b:g}=e,m=n.mul(g,Pt),{px:y,py:B,pz:q}=this,A=n.ZERO,v=n.ZERO,S=n.ZERO,I=n.mul(y,y),K=n.mul(B,B),L=n.mul(q,q),T=n.mul(y,B);return T=n.add(T,T),S=n.mul(y,q),S=n.add(S,S),A=n.mul(u,S),v=n.mul(m,L),v=n.add(A,v),A=n.sub(K,v),v=n.add(K,v),v=n.mul(A,v),A=n.mul(T,A),S=n.mul(m,S),L=n.mul(u,L),T=n.sub(I,L),T=n.mul(u,T),T=n.add(T,S),S=n.add(I,I),I=n.add(S,I),I=n.add(I,L),I=n.mul(I,T),v=n.add(v,I),L=n.mul(B,q),L=n.add(L,L),I=n.mul(L,T),A=n.sub(A,I),S=n.mul(L,K),S=n.add(S,S),S=n.add(S,S),new l(A,v,S)}add(u){a(u);let{px:g,py:m,pz:y}=this,{px:B,py:q,pz:A}=u,v=n.ZERO,S=n.ZERO,I=n.ZERO,K=e.a,L=n.mul(e.b,Pt),T=n.mul(g,B),M=n.mul(m,q),w=n.mul(y,A),x=n.add(g,m),E=n.add(B,q);x=n.mul(x,E),E=n.add(T,M),x=n.sub(x,E),E=n.add(g,y);let O=n.add(B,A);return E=n.mul(E,O),O=n.add(T,w),E=n.sub(E,O),O=n.add(m,y),v=n.add(q,A),O=n.mul(O,v),v=n.add(M,w),O=n.sub(O,v),I=n.mul(K,E),v=n.mul(L,w),I=n.add(v,I),v=n.sub(M,I),I=n.add(M,I),S=n.mul(v,I),M=n.add(T,T),M=n.add(M,T),w=n.mul(K,w),E=n.mul(L,E),M=n.add(M,w),w=n.sub(T,w),w=n.mul(K,w),E=n.add(E,w),T=n.mul(M,E),S=n.add(S,T),T=n.mul(O,E),v=n.mul(x,v),v=n.sub(v,T),T=n.mul(x,M),I=n.mul(O,I),I=n.add(I,T),new l(v,S,I)}subtract(u){return this.add(u.negate())}is0(){return this.equals(l.ZERO)}wNAF(u){return _.wNAFCached(this,u,l.normalizeZ)}multiplyUnsafe(u){J("scalar",u,X,e.n);let g=l.ZERO;if(u===X)return g;if(u===N)return this;let{endo:m}=e;if(!m)return _.unsafeLadder(this,u);let{k1neg:y,k1:B,k2neg:q,k2:A}=m.splitScalar(u),v=g,S=g,I=this;for(;B>X||A>X;)B&N&&(v=v.add(I)),A&N&&(S=S.add(I)),I=I.double(),B>>=N,A>>=N;return y&&(v=v.negate()),q&&(S=S.negate()),S=new l(n.mul(S.px,m.beta),S.py,S.pz),v.add(S)}multiply(u){let{endo:g,n:m}=e;J("scalar",u,N,m);let y,B;if(g){let{k1neg:q,k1:A,k2neg:v,k2:S}=g.splitScalar(u),{p:I,f:K}=this.wNAF(A),{p:L,f:T}=this.wNAF(S);I=_.constTimeNegate(q,I),L=_.constTimeNegate(v,L),L=new l(n.mul(L.px,g.beta),L.py,L.pz),y=I.add(L),B=K.add(T)}else{let{p:q,f:A}=this.wNAF(u);y=q,B=A}return l.normalizeZ([y,B])[0]}multiplyAndAddUnsafe(u,g,m){let y=l.BASE,B=(A,v)=>v===X||v===N||!A.equals(y)?A.multiplyUnsafe(v):A.multiply(v),q=B(this,g).add(B(u,m));return q.is0()?void 0:q}toAffine(u){return h(this,u)}isTorsionFree(){let{h:u,isTorsionFree:g}=e;if(u===N)return!0;if(g)return g(l,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:u,clearCofactor:g}=e;return u===N?this:g?g(l,this):this.multiplyUnsafe(e.h)}toRawBytes(u=!0){return ht("isCompressed",u),this.assertValidity(),s(l,this,u)}toHex(u=!0){return ht("isCompressed",u),gt(this.toRawBytes(u))}}l.BASE=new l(e.Gx,e.Gy,n.ONE),l.ZERO=new l(n.ZERO,n.ONE,n.ZERO);let p=e.nBitLength,_=Le(l,e.endo?Math.ceil(p/2):p);return{CURVE:e,ProjectivePoint:l,normPrivateKeyToScalar:i,weierstrassEquation:c,isWithinCurveOrder:f}}function Sn(t){let e=ue(t);return F(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function $e(t){let e=Sn(t),{Fp:n,n:r}=e,s=n.BYTES+1,o=2*n.BYTES+1;function c(w){return U(w,r)}function f(w){return zt(w,r)}let{ProjectivePoint:i,normPrivateKeyToScalar:a,weierstrassEquation:h,isWithinCurveOrder:d}=vn({...e,toBytes(w,x,E){let O=x.toAffine(),R=n.toBytes(O.x),k=Z;return ht("isCompressed",E),E?k(Uint8Array.from([x.hasEvenY()?2:3]),R):k(Uint8Array.from([4]),R,n.toBytes(O.y))},fromBytes(w){let x=w.length,E=w[0],O=w.subarray(1);if(x===s&&(E===2||E===3)){let R=j(O);if(!ft(R,N,n.ORDER))throw new Error("Point is not on curve");let k=h(R),V;try{V=n.sqrt(k)}catch(Y){let rt=Y instanceof Error?": "+Y.message:"";throw new Error("Point is not on curve"+rt)}let z=(V&N)===N;return(E&1)===1!==z&&(V=n.neg(V)),{x:R,y:V}}else if(x===o&&E===4){let R=n.fromBytes(O.subarray(0,n.BYTES)),k=n.fromBytes(O.subarray(n.BYTES,2*n.BYTES));return{x:R,y:k}}else throw new Error(`Point of length ${x} was invalid. Expected ${s} compressed bytes or ${o} uncompressed bytes`)}}),l=w=>gt(W(w,e.nByteLength));function p(w){let x=r>>N;return w>x}function _(w){return p(w)?c(-w):w}let b=(w,x,E)=>j(w.slice(x,E));class u{constructor(x,E,O){this.r=x,this.s=E,this.recovery=O,this.assertValidity()}static fromCompact(x){let E=e.nByteLength;return x=C("compactSignature",x,E*2),new u(b(x,0,E),b(x,E,2*E))}static fromDER(x){let{r:E,s:O}=et.toSig(C("DER",x));return new u(E,O)}assertValidity(){J("r",this.r,N,r),J("s",this.s,N,r)}addRecoveryBit(x){return new u(this.r,this.s,x)}recoverPublicKey(x){let{r:E,s:O,recovery:R}=this,k=A(C("msgHash",x));if(R==null||![0,1,2,3].includes(R))throw new Error("recovery id invalid");let V=R===2||R===3?E+e.n:E;if(V>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");let z=R&1?"03":"02",nt=i.fromHex(z+l(V)),Y=f(V),rt=c(-k*Y),Bt=c(O*Y),ot=i.BASE.multiplyAndAddUnsafe(nt,rt,Bt);if(!ot)throw new Error("point at infinify");return ot.assertValidity(),ot}hasHighS(){return p(this.s)}normalizeS(){return this.hasHighS()?new u(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return wt(this.toDERHex())}toDERHex(){return et.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return wt(this.toCompactHex())}toCompactHex(){return l(this.r)+l(this.s)}}let g={isValidPrivateKey(w){try{return a(w),!0}catch{return!1}},normPrivateKeyToScalar:a,randomPrivateKey:()=>{let w=ce(e.n);return Ne(e.randomBytes(w),e.n)},precompute(w=8,x=i.BASE){return x._setWindowSize(w),x.multiply(BigInt(3)),x}};function m(w,x=!0){return i.fromPrivateKey(w).toRawBytes(x)}function y(w){let x=ct(w),E=typeof w=="string",O=(x||E)&&w.length;return x?O===s||O===o:E?O===2*s||O===2*o:w instanceof i}function B(w,x,E=!0){if(y(w))throw new Error("first arg must be private key");if(!y(x))throw new Error("second arg must be public key");return i.fromHex(x).multiply(a(w)).toRawBytes(E)}let q=e.bits2int||function(w){let x=j(w),E=w.length*8-e.nBitLength;return E>0?x>>BigInt(E):x},A=e.bits2int_modN||function(w){return c(q(w))},v=At(e.nBitLength);function S(w){return J(`num < 2^${e.nBitLength}`,w,X,v),W(w,e.nByteLength)}function I(w,x,E=K){if(["recovered","canonical"].some(lt=>lt in E))throw new Error("sign() legacy options not supported");let{hash:O,randomBytes:R}=e,{lowS:k,prehash:V,extraEntropy:z}=E;k==null&&(k=!0),w=C("msgHash",w),Ue(E),V&&(w=C("prehashed msgHash",O(w)));let nt=A(w),Y=a(x),rt=[S(Y),S(nt)];if(z!=null&&z!==!1){let lt=z===!0?R(n.BYTES):z;rt.push(C("extraEntropy",lt))}let Bt=Z(...rt),ot=nt;function Wt(lt){let pt=q(lt);if(!d(pt))return;let we=f(pt),Q=i.BASE.multiply(pt).toAffine(),yt=c(Q.x);if(yt===X)return;let Tt=c(we*c(ot+yt*Y));if(Tt===X)return;let be=(Q.x===yt?0:2)|Number(Q.y&N),pe=Tt;return k&&p(Tt)&&(pe=_(Tt),be^=1),new u(yt,pe,be)}return{seed:Bt,k2sig:Wt}}let K={lowS:e.lowS,prehash:!1},L={lowS:e.lowS,prehash:!1};function T(w,x,E=K){let{seed:O,k2sig:R}=I(w,x,E),k=e;return re(k.hash.outputLen,k.nByteLength,k.hmac)(O,R)}i.BASE._setWindowSize(8);function M(w,x,E,O=L){let R=w;if(x=C("msgHash",x),E=C("publicKey",E),"strict"in O)throw new Error("options.strict was renamed to lowS");Ue(O);let{lowS:k,prehash:V}=O,z,nt;try{if(typeof R=="string"||ct(R))try{z=u.fromDER(R)}catch(Q){if(!(Q instanceof et.Err))throw Q;z=u.fromCompact(R)}else if(typeof R=="object"&&typeof R.r=="bigint"&&typeof R.s=="bigint"){let{r:Q,s:yt}=R;z=new u(Q,yt)}else throw new Error("PARSE");nt=i.fromHex(E)}catch(Q){if(Q.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(k&&z.hasHighS())return!1;V&&(x=e.hash(x));let{r:Y,s:rt}=z,Bt=A(x),ot=f(rt),Wt=c(Bt*ot),lt=c(Y*ot),pt=i.BASE.multiplyAndAddUnsafe(nt,Wt,lt)?.toAffine();return pt?c(pt.x)===Y:!1}return{CURVE:e,getPublicKey:m,getSharedSecret:B,sign:T,verify:M,ProjectivePoint:i,Signature:u,utils:g}}function An(t,e){let n=t.ORDER,r=X;for(let _=n-N;_%at===X;_/=at)r+=N;let s=r,o=at<<s-N-N,c=o*at,f=(n-N)/c,i=(f-N)/at,a=c-N,h=o,d=t.pow(e,f),l=t.pow(e,(f+N)/at),p=(_,b)=>{let u=d,g=t.pow(b,a),m=t.sqr(g);m=t.mul(m,b);let y=t.mul(_,m);y=t.pow(y,i),y=t.mul(y,g),g=t.mul(y,b),m=t.mul(y,_);let B=t.mul(m,g);y=t.pow(B,h);let q=t.eql(y,t.ONE);g=t.mul(m,l),y=t.mul(B,u),m=t.cmov(g,m,q),B=t.cmov(y,B,q);for(let A=s;A>N;A--){let v=A-at;v=at<<v-N;let S=t.pow(B,v),I=t.eql(S,t.ONE);g=t.mul(m,u),u=t.mul(u,u),S=t.mul(B,u),m=t.cmov(g,m,I),B=t.cmov(S,B,I)}return{isValid:q,value:m}};if(t.ORDER%Ce===Pt){let _=(t.ORDER-Pt)/Ce,b=t.sqrt(t.neg(e));p=(u,g)=>{let m=t.sqr(g),y=t.mul(u,g);m=t.mul(m,y);let B=t.pow(m,_);B=t.mul(B,y);let q=t.mul(B,b),A=t.mul(t.sqr(B),g),v=t.eql(A,u),S=t.cmov(q,B,v);return{isValid:v,value:S}}}return p}function ke(t,e){if(jt(t),!t.isValid(e.A)||!t.isValid(e.B)||!t.isValid(e.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");let n=An(t,e.Z);if(!t.isOdd)throw new Error("Fp.isOdd is not implemented!");return r=>{let s,o,c,f,i,a,h,d;s=t.sqr(r),s=t.mul(s,e.Z),o=t.sqr(s),o=t.add(o,s),c=t.add(o,t.ONE),c=t.mul(c,e.B),f=t.cmov(e.Z,t.neg(o),!t.eql(o,t.ZERO)),f=t.mul(f,e.A),o=t.sqr(c),a=t.sqr(f),i=t.mul(a,e.A),o=t.add(o,i),o=t.mul(o,c),a=t.mul(a,f),i=t.mul(a,e.B),o=t.add(o,i),h=t.mul(s,c);let{isValid:l,value:p}=n(o,a);d=t.mul(s,r),d=t.mul(d,p),h=t.cmov(h,c,l),d=t.cmov(d,p,l);let _=t.isOdd(r)===t.isOdd(d);return d=t.cmov(t.neg(d),d,_),h=t.div(h,f),{x:h,y:d}}}function In(t){return{hash:t,hmac:(e,...n)=>Qt(t,e,Be(...n)),randomBytes:Ht}}function Ze(t,e){let n=r=>$e({...t,...In(r)});return Object.freeze({...n(e),create:n})}var _n=j;function ut(t,e){if(It(t),It(e),t<0||t>=1<<8*e)throw new Error(`bad I2OSP call: value=${t} length=${e}`);let n=Array.from({length:e}).fill(0);for(let r=e-1;r>=0;r--)n[r]=t&255,t>>>=8;return new Uint8Array(n)}function On(t,e){let n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t[r]^e[r];return n}function It(t){if(!Number.isSafeInteger(t))throw new Error("number expected")}function qn(t,e,n,r){D(t),D(e),It(n),e.length>255&&(e=r(Z(St("H2C-OVERSIZE-DST-"),e)));let{outputLen:s,blockLen:o}=r,c=Math.ceil(n/s);if(n>65535||c>255)throw new Error("expand_message_xmd: invalid lenInBytes");let f=Z(e,ut(e.length,1)),i=ut(0,o),a=ut(n,2),h=new Array(c),d=r(Z(i,t,a,ut(0,1),f));h[0]=r(Z(d,ut(1,1),f));for(let p=1;p<=c;p++){let _=[On(d,h[p-1]),ut(p+1,1),f];h[p]=r(Z(..._))}return Z(...h).slice(0,n)}function Tn(t,e,n,r,s){if(D(t),D(e),It(n),e.length>255){let o=Math.ceil(2*r/8);e=s.create({dkLen:o}).update(St("H2C-OVERSIZE-DST-")).update(e).digest()}if(n>65535||e.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return s.create({dkLen:n}).update(t).update(ut(n,2)).update(e).update(ut(e.length,1)).digest()}function Ve(t,e,n){F(n,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});let{p:r,k:s,m:o,hash:c,expand:f,DST:i}=n;D(t),It(e);let a=typeof i=="string"?St(i):i,h=r.toString(2).length,d=Math.ceil((h+s)/8),l=e*o*d,p;if(f==="xmd")p=qn(t,a,l,c);else if(f==="xof")p=Tn(t,a,l,s,c);else if(f==="_internal_pass")p=t;else throw new Error('expand must be "xmd" or "xof"');let _=new Array(e);for(let b=0;b<e;b++){let u=new Array(o);for(let g=0;g<o;g++){let m=d*(g+b*o),y=p.subarray(m,m+d);u[g]=U(_n(y),r)}_[b]=u}return _}function ze(t,e){let n=e.map(r=>Array.from(r).reverse());return(r,s)=>{let[o,c,f,i]=n.map(a=>a.reduce((h,d)=>t.add(t.mul(h,r),d)));return r=t.div(o,c),s=t.mul(s,t.div(f,i)),{x:r,y:s}}}function je(t,e,n){if(typeof e!="function")throw new Error("mapToCurve() must be defined");return{hashToCurve(r,s){let o=Ve(r,2,{...n,DST:n.DST,...s}),c=t.fromAffine(e(o[0])),f=t.fromAffine(e(o[1])),i=c.add(f).clearCofactor();return i.assertValidity(),i},encodeToCurve(r,s){let o=Ve(r,1,{...n,DST:n.encodeDST,...s}),c=t.fromAffine(e(o[0])).clearCofactor();return c.assertValidity(),c},mapToCurve(r){if(!Array.isArray(r))throw new Error("mapToCurve: expected array of bigints");for(let o of r)if(typeof o!="bigint")throw new Error(`mapToCurve: expected array of bigints, got ${o} in array`);let s=t.fromAffine(e(r)).clearCofactor();return s.assertValidity(),s}}}var qt=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Kt=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),_t=BigInt(1),Dt=BigInt(2),Me=(t,e)=>(t+e/Dt)/e;function Ke(t){let e=qt,n=BigInt(3),r=BigInt(6),s=BigInt(11),o=BigInt(22),c=BigInt(23),f=BigInt(44),i=BigInt(88),a=t*t*t%e,h=a*a*t%e,d=P(h,n,e)*h%e,l=P(d,n,e)*h%e,p=P(l,Dt,e)*a%e,_=P(p,s,e)*p%e,b=P(_,o,e)*_%e,u=P(b,f,e)*b%e,g=P(u,i,e)*u%e,m=P(g,f,e)*b%e,y=P(m,n,e)*h%e,B=P(y,c,e)*_%e,q=P(B,r,e)*a%e,A=P(q,Dt,e);if(!dt.eql(dt.sqr(A),t))throw new Error("Cannot find square root");return A}var dt=Mt(qt,void 0,void 0,{sqrt:Ke}),Gt=Ze({a:BigInt(0),b:BigInt(7),Fp:dt,n:Kt,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:t=>{let e=Kt,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-_t*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),s=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=n,c=BigInt("0x100000000000000000000000000000000"),f=Me(o*t,e),i=Me(-r*t,e),a=U(t-f*n-i*s,e),h=U(-f*r-i*o,e),d=a>c,l=h>c;if(d&&(a=e-a),l&&(h=e-h),a>c||h>c)throw new Error("splitScalar: Endomorphism failed, k="+t);return{k1neg:d,k1:a,k2neg:l,k2:h}}}},vt),De=BigInt(0),Pe={};function Yt(t,...e){let n=Pe[t];if(n===void 0){let r=vt(Uint8Array.from(t,s=>s.charCodeAt(0)));n=Z(r,r),Pe[t]=n}return vt(Z(n,...e))}var ge=t=>t.toRawBytes(!0).slice(1),le=t=>W(t,32),de=t=>U(t,qt),Ot=t=>U(t,Kt),me=Gt.ProjectivePoint,Nn=(t,e,n)=>me.BASE.multiplyAndAddUnsafe(t,e,n);function he(t){let e=Gt.utils.normPrivateKeyToScalar(t),n=me.fromPrivateKey(e);return{scalar:n.hasEvenY()?e:Ot(-e),bytes:ge(n)}}function Ye(t){J("x",t,_t,qt);let e=de(t*t),n=de(e*t+BigInt(7)),r=Ke(n);r%Dt!==De&&(r=de(-r));let s=new me(t,r,_t);return s.assertValidity(),s}var Et=j;function Ge(...t){return Ot(Et(Yt("BIP0340/challenge",...t)))}function Rn(t){return he(t).bytes}function Ln(t,e,n=Ht(32)){let r=C("message",t),{bytes:s,scalar:o}=he(e),c=C("auxRand",n,32),f=le(o^Et(Yt("BIP0340/aux",c))),i=Yt("BIP0340/nonce",f,s,r),a=Ot(Et(i));if(a===De)throw new Error("sign failed: k is zero");let{bytes:h,scalar:d}=he(a),l=Ge(h,s,r),p=new Uint8Array(64);if(p.set(h,0),p.set(le(Ot(d+l*o)),32),!We(p,r,s))throw new Error("sign: Invalid signature produced");return p}function We(t,e,n){let r=C("signature",t,64),s=C("message",e),o=C("publicKey",n,32);try{let c=Ye(Et(o)),f=Et(r.subarray(0,32));if(!ft(f,_t,qt))return!1;let i=Et(r.subarray(32,64));if(!ft(i,_t,Kt))return!1;let a=Ge(le(f),ge(c),s),h=Nn(c,i,Ot(-a));return!(!h||!h.hasEvenY()||h.toAffine().x!==f)}catch{return!1}}var hr={getPublicKey:Rn,sign:Ln,verify:We,utils:{randomPrivateKey:Gt.utils.randomPrivateKey,lift_x:Ye,pointToBytes:ge,numberToBytesBE:W,bytesToNumberBE:j,taggedHash:Yt,mod:U}},Hn=ze(dt,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map(t=>t.map(e=>BigInt(e)))),Un=ke(dt,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:dt.create(BigInt("-11"))}),Xe=je(Gt.ProjectivePoint,t=>{let{x:e,y:n}=Un(dt.create(t[0]));return Hn(e,n)},{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:dt.ORDER,m:1,k:128,expand:"xmd",hash:vt}),gr=Xe.hashToCurve,mr=Xe.encodeToCurve;export{mr as encodeToCurve,gr as hashToCurve,hr as schnorr,Gt as secp256k1};
2
+ /*! Bundled license information:
3
+
4
+ @noble/curves/esm/abstract/utils.js:
5
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
6
+
7
+ @noble/curves/esm/abstract/modular.js:
8
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
9
+
10
+ @noble/curves/esm/abstract/curve.js:
11
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
12
+
13
+ @noble/curves/esm/abstract/weierstrass.js:
14
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
15
+
16
+ @noble/curves/esm/_shortw_utils.js:
17
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
18
+
19
+ @noble/curves/esm/secp256k1.js:
20
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
21
+ */
22
+ //# sourceMappingURL=secp256k1-UMYSD4MC.js.map