@latticexyz/world-module-erc20 2.2.18-318924725246340b208d3fbee8793314686f1759 → 2.2.18-4565714f5e9421cc7b2de56fe51db4434c55f5d1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_esm-BQNWKNND.js +10 -0
- package/dist/{_esm-H47RQ4ED.js.map → _esm-BQNWKNND.js.map} +1 -1
- package/dist/ccip-YAWUVTAX.js +2 -0
- package/dist/chunk-GSBUANUZ.js +30 -0
- package/dist/{chunk-LIWKL347.js.map → chunk-GSBUANUZ.js.map} +1 -1
- package/dist/chunk-LURIOADG.js +2 -0
- package/dist/chunk-TJJDXMQ6.js +7 -0
- package/dist/{chunk-2VXHCW2O.js.map → chunk-TJJDXMQ6.js.map} +1 -1
- package/dist/internal.js +1 -27
- package/dist/internal.js.map +1 -1
- package/dist/mud.config.js +1 -83
- package/dist/mud.config.js.map +1 -1
- package/dist/secp256k1-UMYSD4MC.js +22 -0
- package/dist/{secp256k1-XVT662DN.js.map → secp256k1-UMYSD4MC.js.map} +1 -1
- package/out/AccessManagementSystem.sol/AccessManagementSystem.json +1 -1
- package/out/BalanceTransferSystem.sol/BalanceTransferSystem.json +1 -1
- package/out/BatchCallSystem.sol/BatchCallSystem.json +1 -1
- package/out/Constants.sol/ERC20TableNames.json +1 -1
- package/out/Constants.sol/ModuleConstants.json +1 -1
- package/out/Constants.sol/OwnableTableNames.json +1 -1
- package/out/Constants.sol/PausableTableNames.json +1 -1
- package/out/Context.sol/Context.abi.json +1 -15
- package/out/Context.sol/Context.json +1 -1
- package/out/Delegation.sol/Delegation.json +1 -1
- package/out/ERC20BaseTest.t.sol/ERC20BehaviorTest.json +1 -1
- package/out/ERC20BaseTest.t.sol/ERC20WithInternalStoreBehaviorTest.json +1 -1
- package/out/ERC20BaseTest.t.sol/ERC20WithInternalStoreTest.json +1 -1
- package/out/ERC20BaseTest.t.sol/ERC20WithWorldBehaviorTest.json +1 -1
- package/out/ERC20BaseTest.t.sol/ERC20WithWorldTest.json +1 -1
- package/out/ERC20BaseTest.t.sol/MockERC20Base.abi.json +0 -13
- package/out/ERC20BaseTest.t.sol/MockERC20Base.abi.json.d.ts +0 -13
- package/out/ERC20BaseTest.t.sol/MockERC20Base.json +1 -1
- package/out/ERC20BaseTest.t.sol/MockERC20WithInternalStore.abi.json +0 -13
- package/out/ERC20BaseTest.t.sol/MockERC20WithInternalStore.abi.json.d.ts +0 -13
- package/out/ERC20BaseTest.t.sol/MockERC20WithInternalStore.json +1 -1
- package/out/ERC20BaseTest.t.sol/MockERC20WithWorld.abi.json +3 -95
- package/out/ERC20BaseTest.t.sol/MockERC20WithWorld.abi.json.d.ts +3 -95
- package/out/ERC20BaseTest.t.sol/MockERC20WithWorld.json +1 -1
- package/out/ERC20BaseTest.t.sol/TestConstants.json +1 -1
- package/out/ERC20Burnable.sol/ERC20Burnable.abi.json +0 -13
- package/out/ERC20Burnable.sol/ERC20Burnable.abi.json.d.ts +0 -13
- package/out/ERC20Burnable.sol/ERC20Burnable.json +1 -1
- package/out/ERC20Burnable.t.sol/ERC20BurnableTest.json +1 -1
- package/out/ERC20Burnable.t.sol/ERC20BurnableWithInternalStoreTest.json +1 -1
- package/out/ERC20Burnable.t.sol/ERC20BurnableWithWorldTest.json +1 -1
- package/out/ERC20Burnable.t.sol/MockERC20WithInternalStoreBurnable.abi.json +0 -13
- package/out/ERC20Burnable.t.sol/MockERC20WithInternalStoreBurnable.abi.json.d.ts +0 -13
- package/out/ERC20Burnable.t.sol/MockERC20WithInternalStoreBurnable.json +1 -1
- package/out/ERC20Burnable.t.sol/MockERC20WithWorldBurnable.abi.json +3 -95
- package/out/ERC20Burnable.t.sol/MockERC20WithWorldBurnable.abi.json.d.ts +3 -95
- package/out/ERC20Burnable.t.sol/MockERC20WithWorldBurnable.json +1 -1
- package/out/ERC20Module.sol/ERC20Module.json +1 -1
- package/out/ERC20Module.sol/ERC20RegistryLib.json +1 -1
- package/out/ERC20Module.t.sol/ERC20ModuleTest.json +1 -1
- package/out/ERC20Module.t.sol/TestConstants.json +1 -1
- package/out/ERC20Pausable.sol/ERC20Pausable.abi.json +0 -13
- package/out/ERC20Pausable.sol/ERC20Pausable.abi.json.d.ts +0 -13
- package/out/ERC20Pausable.sol/ERC20Pausable.json +1 -1
- package/out/ERC20Pausable.t.sol/ERC20PausableBehaviorTest.json +1 -1
- package/out/ERC20Pausable.t.sol/ERC20PausableWithInternalStoreTest.json +1 -1
- package/out/ERC20Pausable.t.sol/ERC20PausableWithWorldTest.json +1 -1
- package/out/ERC20Pausable.t.sol/MockERC20Pausable.abi.json +0 -13
- package/out/ERC20Pausable.t.sol/MockERC20Pausable.abi.json.d.ts +0 -13
- package/out/ERC20Pausable.t.sol/MockERC20Pausable.json +1 -1
- package/out/ERC20Pausable.t.sol/MockERC20WithInternalStorePausable.abi.json +0 -13
- package/out/ERC20Pausable.t.sol/MockERC20WithInternalStorePausable.abi.json.d.ts +0 -13
- package/out/ERC20Pausable.t.sol/MockERC20WithInternalStorePausable.json +1 -1
- package/out/ERC20Pausable.t.sol/MockERC20WithWorldPausable.abi.json +3 -95
- package/out/ERC20Pausable.t.sol/MockERC20WithWorldPausable.abi.json.d.ts +3 -95
- package/out/ERC20Pausable.t.sol/MockERC20WithWorldPausable.json +1 -1
- package/out/ERC20WithInternalStore.sol/ERC20WithInternalStore.abi.json +0 -13
- package/out/ERC20WithInternalStore.sol/ERC20WithInternalStore.abi.json.d.ts +0 -13
- package/out/ERC20WithInternalStore.sol/ERC20WithInternalStore.json +1 -1
- package/out/ERC20WithWorld.sol/ERC20WithWorld.abi.json +3 -95
- package/out/ERC20WithWorld.sol/ERC20WithWorld.abi.json.d.ts +3 -95
- package/out/ERC20WithWorld.sol/ERC20WithWorld.json +1 -1
- package/out/IBaseWorld.sol/IBaseWorld.json +1 -1
- package/out/IWorldRegistrationSystem.sol/IWorldRegistrationSystem.json +1 -1
- package/out/InitModule.sol/InitModule.json +1 -1
- package/out/MUDERC20.sol/MUDERC20.abi.json +0 -13
- package/out/MUDERC20.sol/MUDERC20.abi.json.d.ts +0 -13
- package/out/MUDERC20.sol/MUDERC20.json +1 -1
- package/out/Module.sol/Module.json +1 -1
- package/out/ModuleInstallationSystem.sol/ModuleInstallationSystem.json +1 -1
- package/out/Ownable.sol/Ownable.abi.json +0 -13
- package/out/Ownable.sol/Ownable.abi.json.d.ts +0 -13
- package/out/Ownable.sol/Ownable.json +1 -1
- package/out/Pausable.sol/Pausable.abi.json +0 -13
- package/out/Pausable.sol/Pausable.abi.json.d.ts +0 -13
- package/out/Pausable.sol/Pausable.json +1 -1
- package/out/RegistrationSystem.sol/RegistrationSystem.json +1 -1
- package/out/StoreConsumer.sol/StoreConsumer.json +1 -1
- package/out/StoreRegistrationSystem.sol/StoreRegistrationSystem.json +1 -1
- package/out/System.sol/System.json +1 -1
- package/out/SystemCall.sol/SystemCall.json +1 -1
- package/out/WithStore.sol/WithStore.abi.json +0 -13
- package/out/WithStore.sol/WithStore.abi.json.d.ts +0 -13
- package/out/WithStore.sol/WithStore.json +1 -1
- package/out/WithWorld.sol/WithWorld.abi.json +3 -95
- package/out/WithWorld.sol/WithWorld.abi.json.d.ts +3 -95
- package/out/WithWorld.sol/WithWorld.json +1 -1
- package/out/World.sol/World.json +1 -1
- package/out/WorldContext.sol/WorldContextConsumer.json +1 -1
- package/out/WorldContext.sol/WorldContextConsumerLib.json +1 -1
- package/out/WorldContext.sol/WorldContextProviderLib.json +1 -1
- package/out/WorldRegistrationSystem.sol/WorldRegistrationSystem.json +1 -1
- package/out/build-info/{60c60a9593fdb00b3264c36836a28f39.json → 04cd01b00610d99132b6410373c2f462.json} +1 -1
- package/package.json +10 -9
- package/src/examples/ERC20WithWorld.sol +0 -5
- package/src/experimental/Constants.sol +7 -7
- package/src/experimental/ERC20Module.sol +1 -9
- package/dist/_esm-H47RQ4ED.js +0 -3915
- package/dist/ccip-VJWDNI4X.js +0 -15
- package/dist/chunk-2VXHCW2O.js +0 -132
- package/dist/chunk-LIWKL347.js +0 -3833
- package/dist/chunk-PR4QN5HX.js +0 -43
- package/dist/secp256k1-XVT662DN.js +0 -2395
- package/out/Context.sol/Context.abi.json.d.ts +0 -17
- /package/dist/{ccip-VJWDNI4X.js.map → ccip-YAWUVTAX.js.map} +0 -0
- /package/dist/{chunk-PR4QN5HX.js.map → chunk-LURIOADG.js.map} +0 -0
|
@@ -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,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
|
|
@@ -1 +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":"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","names":[]}
|
|
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":"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","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,28 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
encodeAbiParameters,
|
|
3
|
-
stringToHex
|
|
4
|
-
} from "./chunk-LIWKL347.js";
|
|
5
|
-
import "./chunk-2VXHCW2O.js";
|
|
6
|
-
import "./chunk-PR4QN5HX.js";
|
|
7
|
-
|
|
8
|
-
// ts/defineERC20Module.ts
|
|
9
|
-
function defineERC20Module({ namespace, name, symbol }) {
|
|
10
|
-
const erc20ModuleArgs = encodeAbiParameters(
|
|
11
|
-
[{ type: "bytes14" }, { type: "bytes16" }, { type: "string" }, { type: "string" }],
|
|
12
|
-
[stringToHex(namespace, { size: 14 }), stringToHex(name, { size: 16 }), name, symbol]
|
|
13
|
-
);
|
|
14
|
-
return {
|
|
15
|
-
artifactPath: "@latticexyz/world-module-erc20/out/ERC20Module.sol/ERC20Module.json",
|
|
16
|
-
root: false,
|
|
17
|
-
args: [
|
|
18
|
-
{
|
|
19
|
-
type: "bytes",
|
|
20
|
-
value: erc20ModuleArgs
|
|
21
|
-
}
|
|
22
|
-
]
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export {
|
|
26
|
-
defineERC20Module
|
|
27
|
-
};
|
|
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};
|
|
28
2
|
//# sourceMappingURL=internal.js.map
|
package/dist/internal.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
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: \"
|
|
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"]}
|
package/dist/mud.config.js
CHANGED
|
@@ -1,84 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
// mud.config.ts
|
|
4
|
-
import { defineStore } from "@latticexyz/store";
|
|
5
|
-
var mud_config_default = defineStore({
|
|
6
|
-
userTypes: {
|
|
7
|
-
ResourceId: { filePath: "@latticexyz/store/src/ResourceId.sol", type: "bytes32" }
|
|
8
|
-
},
|
|
9
|
-
tables: {
|
|
10
|
-
Owner: {
|
|
11
|
-
schema: {
|
|
12
|
-
value: "address"
|
|
13
|
-
},
|
|
14
|
-
key: [],
|
|
15
|
-
codegen: {
|
|
16
|
-
tableIdArgument: true
|
|
17
|
-
}
|
|
18
|
-
},
|
|
19
|
-
ERC20Metadata: {
|
|
20
|
-
schema: {
|
|
21
|
-
decimals: "uint8",
|
|
22
|
-
name: "string",
|
|
23
|
-
symbol: "string"
|
|
24
|
-
},
|
|
25
|
-
key: [],
|
|
26
|
-
codegen: {
|
|
27
|
-
tableIdArgument: true
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
TotalSupply: {
|
|
31
|
-
schema: {
|
|
32
|
-
totalSupply: "uint256"
|
|
33
|
-
},
|
|
34
|
-
key: [],
|
|
35
|
-
codegen: {
|
|
36
|
-
tableIdArgument: true
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
Balances: {
|
|
40
|
-
schema: {
|
|
41
|
-
account: "address",
|
|
42
|
-
value: "uint256"
|
|
43
|
-
},
|
|
44
|
-
key: ["account"],
|
|
45
|
-
codegen: {
|
|
46
|
-
tableIdArgument: true
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
Allowances: {
|
|
50
|
-
schema: {
|
|
51
|
-
account: "address",
|
|
52
|
-
spender: "address",
|
|
53
|
-
value: "uint256"
|
|
54
|
-
},
|
|
55
|
-
key: ["account", "spender"],
|
|
56
|
-
codegen: {
|
|
57
|
-
tableIdArgument: true
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
Paused: {
|
|
61
|
-
schema: {
|
|
62
|
-
paused: "bool"
|
|
63
|
-
},
|
|
64
|
-
key: [],
|
|
65
|
-
codegen: {
|
|
66
|
-
tableIdArgument: true
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
ERC20Registry: {
|
|
70
|
-
schema: {
|
|
71
|
-
namespaceId: "ResourceId",
|
|
72
|
-
tokenAddress: "address"
|
|
73
|
-
},
|
|
74
|
-
key: ["namespaceId"],
|
|
75
|
-
codegen: {
|
|
76
|
-
tableIdArgument: true
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
export {
|
|
82
|
-
mud_config_default as default
|
|
83
|
-
};
|
|
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};
|
|
84
2
|
//# sourceMappingURL=mud.config.js.map
|
package/dist/mud.config.js.map
CHANGED
|
@@ -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":"
|
|
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
|