From 7d5457302642cf25f1aebff537cd96694fa30dee Mon Sep 17 00:00:00 2001 From: Jordan Ribbink Date: Thu, 11 Jan 2024 16:51:57 -0800 Subject: [PATCH] Fixup key encoding --- cadence/contracts/FCL.cdc | 43 +- cadence/transactions/init.cdc | 4 +- package-lock.json | 903 +++++++++++++++++++++------------- package.json | 5 +- src/crypto.ts | 18 +- src/init.ts | 6 +- 6 files changed, 613 insertions(+), 366 deletions(-) diff --git a/cadence/contracts/FCL.cdc b/cadence/contracts/FCL.cdc index c6af0f6..a8fe8b2 100644 --- a/cadence/contracts/FCL.cdc +++ b/cadence/contracts/FCL.cdc @@ -1,6 +1,18 @@ access(all) contract FCL { access(all) let storagePath: StoragePath + access(all) struct FCLKey { + access(all) let publicKey: [UInt8] + access(all) let signatureAlgorithm: UInt8 + access(all) let hashAlgorithm: UInt8 + + init(publicKey: [UInt8], signatureAlgorithm: UInt8, hashAlgorithm: UInt8) { + self.publicKey = publicKey + self.signatureAlgorithm = signatureAlgorithm + self.hashAlgorithm = hashAlgorithm + } + } + access(all) struct FCLAccount { access(all) let type: String access(all) let address: Address @@ -23,11 +35,11 @@ access(all) contract FCL { } access(all) resource Root { - access(all) let key: [UInt8] + access(all) let key: FCLKey access(all) let accounts: {Address: FCLAccount} - init (_ key: String) { - self.key = key.decodeHex() + init (_ key: FCLKey) { + self.key = key self.accounts = {} } @@ -46,25 +58,23 @@ access(all) contract FCL { return self.account.storage.borrow<&Root>(from: self.storagePath)!.accounts } - access(all) fun getServiceKey(): [UInt8] { - let keyRef = self.account.storage.borrow<&Root>(from: self.storagePath)!.key - return keyRef.map(fun (_ x: UInt8): UInt8 { - return x - }) + access(all) fun getServiceKey(): &FCLKey { + return self.account.storage.borrow<&Root>(from: self.storagePath)!.key } access(all) fun new(label: String, scopes: [String], address: Address?): &Account { let acct = Account(payer: self.account) - let rawKey = self.getServiceKey() - let decodedKey = RLP.decodeList(rawKey) + let key = self.getServiceKey() acct.keys.add( publicKey: PublicKey( - publicKey: decodedKey[0].slice(from: 2, upTo: decodedKey[0].length), - signatureAlgorithm: SignatureAlgorithm.ECDSA_P256, + publicKey: key.publicKey.map(fun (_ byte: UInt8): UInt8 { + return byte + }), + signatureAlgorithm: SignatureAlgorithm(key.signatureAlgorithm)!, ), - hashAlgorithm: HashAlgorithm(decodedKey[2][0])!, - weight: UFix64.fromBigEndianBytes(decodedKey[3])! + hashAlgorithm: HashAlgorithm(key.hashAlgorithm)!, + weight: 1000.0 ) self.account @@ -80,7 +90,10 @@ access(all) contract FCL { .update(address: address, label: label, scopes: scopes) } - init (key: String, initAccountsLabels: [String]) { + init (publicKey: String, hashAlgorithm: UInt8, signAlgorithm: UInt8, initAccountsLabels: [String]) { + let keyByteArray = publicKey.decodeHex() + let key = FCLKey(publicKey: keyByteArray, signatureAlgorithm: signAlgorithm, hashAlgorithm: hashAlgorithm) + self.storagePath = /storage/FCL_DEV_WALLET self.account.storage.save(<- create Root(key), to: self.storagePath) diff --git a/cadence/transactions/init.cdc b/cadence/transactions/init.cdc index d9a769e..d344b02 100644 --- a/cadence/transactions/init.cdc +++ b/cadence/transactions/init.cdc @@ -1,5 +1,5 @@ -transaction(code: String, key: String, initAccountsLabels: [String]) { +transaction(code: String, publicKey: String, hashAlgorithm: UInt8, signAlgorithm: UInt8, initAccountsLabels: [String]) { prepare(acct: auth(Contracts) &Account) { - acct.contracts.add(name: "FCL", code: code.utf8, key: key, initAccountsLabels: initAccountsLabels) + acct.contracts.add(name: "FCL", code: code.utf8, publicKey: publicKey, hashAlgorithm: hashAlgorithm, signAlgorithm: signAlgorithm, initAccountsLabels: initAccountsLabels) } } diff --git a/package-lock.json b/package-lock.json index e448684..381f552 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,9 +14,8 @@ "@headlessui/react": "^1.3.0", "@mdx-js/react": "^1.6.22", "@monaco-editor/react": "^4.2.1", - "@onflow/fcl": "^1.5.0-alpha.4", - "@onflow/types": "^0.0.4", - "@onflow/util-encode-key": "^0.0.2", + "@onflow/fcl": "^1.10.0-alpha.4", + "@onflow/types": "^1.3.0-alpha.2", "@theme-ui/color": "^0.14.5", "@theme-ui/css": "^0.14.5", "@theme-ui/match-media": "^0.14.5", @@ -622,16 +621,16 @@ "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==" }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.37.1", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.37.1.tgz", - "integrity": "sha512-5vxWJ1gEkEF0yRd0O+uK6dHJf7adrxwQSX8PuRiPfFSAbNLnY0ZJfXaZucoz14Jj2N11xn2DnlEPwWRpYpvRjg==", + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz", + "integrity": "sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==", "dependencies": { - "comment-parser": "1.3.1", + "comment-parser": "1.4.1", "esquery": "^1.5.0", "jsdoc-type-pratt-parser": "~4.0.0" }, "engines": { - "node": "^14 || ^16 || ^17 || ^18 || ^19 || ^20" + "node": ">=16" } }, "node_modules/@eslint-community/eslint-utils": { @@ -649,9 +648,9 @@ } }, "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -660,9 +659,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==", + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -720,9 +719,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", - "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } @@ -769,6 +768,17 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" }, + "node_modules/@improbable-eng/grpc-web": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", + "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "dependencies": { + "browser-headers": "^0.4.1" + }, + "peerDependencies": { + "google-protobuf": "^3.14.0" + } + }, "node_modules/@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -1181,20 +1191,22 @@ } }, "node_modules/@onflow/config": { - "version": "1.1.1-alpha.0", - "resolved": "https://registry.npmjs.org/@onflow/config/-/config-1.1.1-alpha.0.tgz", - "integrity": "sha512-XuUSXcT2J4BwcJ0c6wpGXTNJqIA/A3VNVpdZVn95nhGy4Sr7qWGnwnNFhTIu++lyvjMQecCS08N2lLgTEeFpbg==", + "version": "1.2.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/config/-/config-1.2.2-alpha.2.tgz", + "integrity": "sha512-4p8bWdvqvTq+hgRsEhRT0EgEY6jzKQiwW6LwOzQQXGljFASm6oZjKGSxYtrPy0fl9cDf9YNd28e5QlXbaLNyIw==", "dependencies": { "@babel/runtime": "^7.18.6", - "@onflow/util-actor": "^1.2.0", + "@onflow/util-actor": "1.3.2-alpha.2", + "@onflow/util-invariant": "1.2.2-alpha.2", + "@onflow/util-logger": "1.3.2-alpha.2", "eslint": "^8.34.0", - "eslint-plugin-jsdoc": "^40.0.0" + "eslint-plugin-jsdoc": "^46.9.0" } }, "node_modules/@onflow/config/node_modules/@eslint/eslintrc": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", - "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -1214,22 +1226,27 @@ } }, "node_modules/@onflow/config/node_modules/@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "dependencies": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" }, "engines": { "node": ">=10.10.0" } }, + "node_modules/@onflow/config/node_modules/@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==" + }, "node_modules/@onflow/config/node_modules/acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==", "bin": { "acorn": "bin/acorn" }, @@ -1288,26 +1305,27 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "node_modules/@onflow/config/node_modules/eslint": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.45.0.tgz", - "integrity": "sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.1.0", - "@eslint/js": "8.44.0", - "@humanwhocodes/config-array": "^0.11.10", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", + "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.6.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -1341,9 +1359,9 @@ } }, "node_modules/@onflow/config/node_modules/eslint-scope": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.1.tgz", - "integrity": "sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -1356,9 +1374,9 @@ } }, "node_modules/@onflow/config/node_modules/eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" }, @@ -1409,9 +1427,9 @@ } }, "node_modules/@onflow/config/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "dependencies": { "type-fest": "^0.20.2" }, @@ -1514,55 +1532,49 @@ } }, "node_modules/@onflow/fcl": { - "version": "1.5.0-alpha.4", - "resolved": "https://registry.npmjs.org/@onflow/fcl/-/fcl-1.5.0-alpha.4.tgz", - "integrity": "sha512-P5PxJ1jIGoZ7ReGKBhftaDEnGD61nll8J3Yg0Eo02GdL4497+A7ULlMcz8slZk15s3+KFZJiQlRmgd5jZXWsjg==", + "version": "1.10.0-alpha.4", + "resolved": "https://registry.npmjs.org/@onflow/fcl/-/fcl-1.10.0-alpha.4.tgz", + "integrity": "sha512-CvyJvxCwTRIwmbv6ftKJ6a/FWRC/F1RNd6RGSoNXD7C3b7CCwLTUuItydmxpNaX+kKFL8MmRo4qsWBjSgqGy0w==", "dependencies": { "@babel/runtime": "^7.18.6", - "@onflow/config": "^1.1.1-alpha.0", + "@onflow/config": "1.2.2-alpha.2", + "@onflow/fcl-core": "1.8.2-alpha.1", "@onflow/interaction": "0.0.11", - "@onflow/rlp": "^1.1.0", - "@onflow/sdk": "^1.2.1-alpha.0", - "@onflow/types": "^1.1.0", - "@onflow/util-actor": "^1.2.0", - "@onflow/util-address": "^1.1.0", - "@onflow/util-invariant": "^1.1.0", - "@onflow/util-logger": "^1.2.1-alpha.0", - "@onflow/util-template": "^1.1.0", - "@onflow/util-uid": "^1.1.0", - "cross-fetch": "^3.1.6" - }, - "peerDependencies": { - "@react-native-async-storage/async-storage": "^1.13.0", - "expo-linking": "^4.0.0", - "expo-web-browser": "^12.0.0", - "react": "^17.0.0 || ^18.0.0", - "react-native": "^0.0.0-0 || 0.60 - 0.72 || 1000.0.0" - }, - "peerDependenciesMeta": { - "@react-native-async-storage/async-storage": { - "optional": true - }, - "expo-linking": { - "optional": true - }, - "expo-web-browser": { - "optional": true - }, - "react": { - "optional": true - }, - "react-native": { - "optional": true - } + "@onflow/rlp": "1.2.2-alpha.2", + "@onflow/sdk": "1.4.0-alpha.4", + "@onflow/types": "1.3.0-alpha.2", + "@onflow/util-actor": "1.3.2-alpha.2", + "@onflow/util-address": "1.2.2-alpha.2", + "@onflow/util-invariant": "1.2.2-alpha.2", + "@onflow/util-logger": "1.3.2-alpha.2", + "@onflow/util-semver": "1.0.2-alpha.0", + "@onflow/util-template": "1.2.2-alpha.2", + "@onflow/util-uid": "1.2.2-alpha.2", + "cross-fetch": "^3.1.6", + "events": "^3.3.0", + "sha3": "^2.1.4" } }, - "node_modules/@onflow/fcl/node_modules/@onflow/types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@onflow/types/-/types-1.1.0.tgz", - "integrity": "sha512-UUd2ZAFqdd8BHW//uTg+YRlh3EIH9Na+UYJ9qXpt6y87qjW0Lf4Zkhn6H5IqvhIJsjK17QYnXLFpoXItD/+ToQ==", + "node_modules/@onflow/fcl-core": { + "version": "1.8.2-alpha.1", + "resolved": "https://registry.npmjs.org/@onflow/fcl-core/-/fcl-core-1.8.2-alpha.1.tgz", + "integrity": "sha512-hBU0R5AvVgsSFGEPpkyQem+lGxeBUKwtyHO2io3nIWze6gygTlWE7BngiDCL0p+fPCWpkpiVdrrPABG31T9VrQ==", "dependencies": { - "@babel/runtime": "^7.18.6" + "@babel/runtime": "^7.18.6", + "@improbable-eng/grpc-web": "^0.15.0", + "@onflow/config": "1.2.2-alpha.2", + "@onflow/interaction": "0.0.11", + "@onflow/rlp": "1.2.2-alpha.2", + "@onflow/sdk": "1.4.0-alpha.4", + "@onflow/types": "1.3.0-alpha.2", + "@onflow/util-actor": "1.3.2-alpha.2", + "@onflow/util-address": "1.2.2-alpha.2", + "@onflow/util-invariant": "1.2.2-alpha.2", + "@onflow/util-logger": "1.3.2-alpha.2", + "@onflow/util-semver": "1.0.2-alpha.0", + "@onflow/util-template": "1.2.2-alpha.2", + "@onflow/util-uid": "1.2.2-alpha.2", + "cross-fetch": "^3.1.6" } }, "node_modules/@onflow/interaction": { @@ -1571,116 +1583,143 @@ "integrity": "sha512-Xuq1Mmx6Wyba/F/L+QLQs0yJeQDsIDwy5SKk5vrCuVgIj0yD8k506g5L8ODrbM1LWll8i0tQsoOi0F85vNl5sA==" }, "node_modules/@onflow/rlp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@onflow/rlp/-/rlp-1.1.0.tgz", - "integrity": "sha512-JJj4dZpKaWmCOXnado+D3RU5xYAXui9kHOmCVfdLReYHIsYBgxwHCDO/hDiQjrbmfLpiybbJKTaIldu+xkCU3Q==", + "version": "1.2.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/rlp/-/rlp-1.2.2-alpha.2.tgz", + "integrity": "sha512-W18UFAE1TXHlyypC1+G4WpUKXjd1IQbx6VaLXFDB1fbYkxuWOkrsKVaLPfKd6Y7/Cij6cNJI4F9J5su4bnUysw==", "dependencies": { "@babel/runtime": "^7.18.6", "buffer": "^6.0.3" } }, "node_modules/@onflow/sdk": { - "version": "1.2.1-alpha.1", - "resolved": "https://registry.npmjs.org/@onflow/sdk/-/sdk-1.2.1-alpha.1.tgz", - "integrity": "sha512-4wvlhiIbQ1NuhVsK1SAWtz4MeaXQr3S5qXq51+lEZ/xpKA1Eggnn6SDUhbLeW6eBCxDZef4CbEBx3sQxz2RHSw==", + "version": "1.4.0-alpha.4", + "resolved": "https://registry.npmjs.org/@onflow/sdk/-/sdk-1.4.0-alpha.4.tgz", + "integrity": "sha512-5GskQh8d2vGci/gadoDIqQgLnJpXGxySrFueU2SL6trMsZyoIe3D2dP2rbHhYyB392bcornV0fao/J1MH/cn2w==", "dependencies": { "@babel/runtime": "^7.18.6", - "@onflow/config": "^1.1.1-alpha.0", - "@onflow/rlp": "^1.1.0", - "@onflow/transport-http": "^1.7.0-alpha.0", - "@onflow/util-actor": "^1.2.0", - "@onflow/util-address": "^1.1.0", - "@onflow/util-invariant": "^1.1.0", - "@onflow/util-logger": "^1.2.1-alpha.0", - "@onflow/util-template": "^1.1.0", + "@onflow/config": "1.2.2-alpha.2", + "@onflow/rlp": "1.2.2-alpha.2", + "@onflow/transport-http": "1.10.0-alpha.3", + "@onflow/typedefs": "1.3.0-alpha.2", + "@onflow/util-actor": "1.3.2-alpha.2", + "@onflow/util-address": "1.2.2-alpha.2", + "@onflow/util-invariant": "1.2.2-alpha.2", + "@onflow/util-logger": "1.3.2-alpha.2", + "@onflow/util-template": "1.2.2-alpha.2", "deepmerge": "^4.2.2", - "sha3": "^2.1.4" + "events": "^3.3.0", + "sha3": "^2.1.4", + "uuid": "^9.0.1" + } + }, + "node_modules/@onflow/sdk/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "bin": { + "uuid": "dist/bin/uuid" } }, "node_modules/@onflow/transport-http": { - "version": "1.7.0-alpha.0", - "resolved": "https://registry.npmjs.org/@onflow/transport-http/-/transport-http-1.7.0-alpha.0.tgz", - "integrity": "sha512-g3m78rOeRnkkk18lumjdQ4vuKbfWXwfn2NNNoEI73V6L7nKlKOVePJrqSrBwI/lWG2z+j58FIpu0cHHqCsUqXg==", + "version": "1.10.0-alpha.3", + "resolved": "https://registry.npmjs.org/@onflow/transport-http/-/transport-http-1.10.0-alpha.3.tgz", + "integrity": "sha512-aruhfGIDdTomrzekDFd5oAM7Q5fJO0htTwuyz7mOc57gOxN00/CjJF05dianlBBdPP1NGUcuqynsZ6PX3cSDjQ==", "dependencies": { "@babel/runtime": "^7.18.6", - "@onflow/util-address": "^1.1.0", - "@onflow/util-invariant": "^1.1.0", - "@onflow/util-logger": "^1.2.1-alpha.0", - "@onflow/util-template": "^1.1.0", + "@onflow/util-address": "1.2.2-alpha.2", + "@onflow/util-invariant": "1.2.2-alpha.2", + "@onflow/util-logger": "1.3.2-alpha.2", + "@onflow/util-template": "1.2.2-alpha.2", "abort-controller": "^3.0.0", - "cross-fetch": "^3.1.6" + "cross-fetch": "^3.1.6", + "events": "^3.3.0", + "isomorphic-ws": "^5.0.0", + "ws": "^8.14.2" + } + }, + "node_modules/@onflow/typedefs": { + "version": "1.3.0-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/typedefs/-/typedefs-1.3.0-alpha.2.tgz", + "integrity": "sha512-boy22ChDls+76inLpr/JPHsvkEsS02374oPdHaFy06peUqfGGrMly7lxL2e/54oqUcZA9F0wCS53OeVrXnCwjw==", + "dependencies": { + "@babel/runtime": "^7.18.6" } }, "node_modules/@onflow/types": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@onflow/types/-/types-0.0.4.tgz", - "integrity": "sha512-47r0qTM45mR7FSvyEE0njGljkpgy3MCf/2W82pfZ/PTFGWr1nsGV/4j2bUfK9Sry4Ymz2W20iRZVP3xpqOhqGw==" + "version": "1.3.0-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/types/-/types-1.3.0-alpha.2.tgz", + "integrity": "sha512-D1fp6/+UmNkTyKuyBIFmf182cRkq3Yjo9bgUEbipjX254KwSPVYcprHLR71JGdbcN5RuzvW07XHj2Q2VUX9PGw==", + "dependencies": { + "@babel/runtime": "^7.18.6", + "@onflow/util-logger": "1.3.2-alpha.2" + } }, "node_modules/@onflow/util-actor": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-1.2.0.tgz", - "integrity": "sha512-voyHXE3qYNC+P75vzv55pGDDwpxxWKWH0aToR/3g9Bq8nKGcGoszxaMJkVy+fKX1akfdT0yKr/GxXRkjCS9SBg==", + "version": "1.3.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-1.3.2-alpha.2.tgz", + "integrity": "sha512-oVuYidjtujVzaSZ5PgSGM7G4OJ5MYxpttnFxuRnKLizulGsOi+qqfuFW40HxyzhZHWOp+2lnkt9Fqk6s+cuDDA==", "dependencies": { "@babel/runtime": "^7.18.6", "queue-microtask": "1.2.3" } }, "node_modules/@onflow/util-address": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@onflow/util-address/-/util-address-1.1.0.tgz", - "integrity": "sha512-HhJOIfNaYAoeYuTNUe85jt4fqnJhFmSbYqyufiJBrplwd3eKmNsan0NYvVYO4U1ecu3KyuY4D9R/NtjGpHjMlA==", + "version": "1.2.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/util-address/-/util-address-1.2.2-alpha.2.tgz", + "integrity": "sha512-Fup1GkMwurljMHTNUcP6UqP/ln+XwnKE8cWjiPiaCnK4NJMrU4jaobrc6aEbZoYIrj8suklfrjvHUuCZ+7DGfQ==", "dependencies": { "@babel/runtime": "^7.18.6" } }, - "node_modules/@onflow/util-encode-key": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@onflow/util-encode-key/-/util-encode-key-0.0.2.tgz", - "integrity": "sha512-gY9H4f1USijXbgk6IoNibAibF8VB6spZgq2fdkxA9PKgKay6UjolnsKTvIkA0k4/CIiODQIh5ziL069mrRjOJw==", + "node_modules/@onflow/util-invariant": { + "version": "1.2.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/util-invariant/-/util-invariant-1.2.2-alpha.2.tgz", + "integrity": "sha512-m7PqZ6RQ4QecpFiYSKMoghT2iT9ceza/qv8Usw2csntcUWOkA+x2hxKh/pUoa8LGK5054gemfNtFac2J9cPOKw==", "dependencies": { - "@onflow/rlp": "0.0.3", - "@onflow/util-invariant": "0.0.0" + "@babel/runtime": "^7.18.6" } }, - "node_modules/@onflow/util-encode-key/node_modules/@onflow/rlp": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@onflow/rlp/-/rlp-0.0.3.tgz", - "integrity": "sha512-oAf0VEiMjX8eC6Vd66j1BdGYTHOM6UBaS/sLSScnc7bKX5gICqe2gtEsCeJVE9rUzRk3GD3JqXRnPAW6YFWd/Q==" - }, - "node_modules/@onflow/util-encode-key/node_modules/@onflow/util-invariant": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/@onflow/util-invariant/-/util-invariant-0.0.0.tgz", - "integrity": "sha512-ZCt+NqLdeHt9tZhb0DGxo6iSIS9oNUpLkd0PEMzUYUHr4UwrUO7VruV1AUW3PaF9V78DZ13fNZUiQEzdF76O/w==" - }, - "node_modules/@onflow/util-invariant": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@onflow/util-invariant/-/util-invariant-1.1.0.tgz", - "integrity": "sha512-5uxweKl5tqeqB1QLzs3dWWLtpNo7H4PgcmgnRIcC2oItAkELcnVCybDdlfYjKB4n/dlg3rIym8cJQE2tBeOpZQ==", + "node_modules/@onflow/util-logger": { + "version": "1.3.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/util-logger/-/util-logger-1.3.2-alpha.2.tgz", + "integrity": "sha512-6mLXIp/7n3bmaxVJcGZVQ0rrJipM6pKEkmH752VTzn8ObXM3HtV91ee86GlY0pH1r64ntnsa+KvOhpmo1kMT8A==", "dependencies": { "@babel/runtime": "^7.18.6" + }, + "peerDependencies": { + "@onflow/util-config": ">1.1.1" + }, + "peerDependenciesMeta": { + "@onflow/util-config": { + "optional": true + } } }, - "node_modules/@onflow/util-logger": { - "version": "1.2.1-alpha.0", - "resolved": "https://registry.npmjs.org/@onflow/util-logger/-/util-logger-1.2.1-alpha.0.tgz", - "integrity": "sha512-JJ0p3O/JoKQzWdyFo4ZNMZ/gGwHrV3k0GoxF/pp6A8ghlNJgNTMgrF7mz3J+nsznaDqXJKGYi7YdcEIH5Rmesg==", + "node_modules/@onflow/util-semver": { + "version": "1.0.2-alpha.0", + "resolved": "https://registry.npmjs.org/@onflow/util-semver/-/util-semver-1.0.2-alpha.0.tgz", + "integrity": "sha512-q+Y8FnQSPiK9911rNXWkNWNQhtLvBQgnROTIxxmi21PUaf5m5QAj/kuZ8SI4LOh0GcdP+QHvv9LzoBkQiSk2Tg==", "dependencies": { - "@babel/runtime": "^7.18.6", - "@onflow/config": "^1.1.1-alpha.0" + "@babel/runtime": "^7.18.6" } }, "node_modules/@onflow/util-template": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@onflow/util-template/-/util-template-1.1.0.tgz", - "integrity": "sha512-gGqJJH5OTPPRmHk6YxMw4t5Ecy7iHnj00ZlCE7lnlOnpGUNdHrNNfoeE//hO8TBGNNVpOkEQERWiLDph+/oIxg==", + "version": "1.2.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/util-template/-/util-template-1.2.2-alpha.2.tgz", + "integrity": "sha512-p+jS1ORr1urEeU7AfoqpP3uOaEgulKrjCOAf4FciyAXo1Dod/+JjPwewW/gv3Yk5fE6TlP9sx74Dg/zLsEAEAQ==", "dependencies": { - "@babel/runtime": "^7.18.6" + "@babel/runtime": "^7.18.6", + "@onflow/util-logger": "1.3.2-alpha.2" } }, "node_modules/@onflow/util-uid": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@onflow/util-uid/-/util-uid-1.1.0.tgz", - "integrity": "sha512-HmWfKCOXoz1/TIu7fRx6iR7Nfhq6q5Tmn4YWc868SIfFeWv/inpvVJyrKX0nORf87csSnRSqdDzrJGBowgcXVA==", + "version": "1.2.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/util-uid/-/util-uid-1.2.2-alpha.2.tgz", + "integrity": "sha512-GUYPQL47FprUWlGHIXQsfoifcAvX9OA1S+wszVHikaH+F4zheWoCJd7EIfojEPEv66CS2aBwcKIbT/z73os9UQ==", "dependencies": { "@babel/runtime": "^7.18.6" } @@ -2257,6 +2296,11 @@ "url": "https://opencollective.com/typescript-eslint" } }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" + }, "node_modules/abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", @@ -2377,6 +2421,14 @@ } ] }, + "node_modules/are-docs-informative": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==", + "engines": { + "node": ">=14" + } + }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -2687,6 +2739,11 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" }, + "node_modules/browser-headers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", + "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" + }, "node_modules/browserslist": { "version": "4.21.4", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", @@ -2747,6 +2804,17 @@ "node": "*" } }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/cachedir": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", @@ -2946,9 +3014,9 @@ } }, "node_modules/comment-parser": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", - "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==", "engines": { "node": ">= 12.0.0" } @@ -3833,23 +3901,25 @@ "dev": true }, "node_modules/eslint-plugin-jsdoc": { - "version": "40.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-40.3.0.tgz", - "integrity": "sha512-EhCqpzRkxoT2DUB4AnrU0ggBYvTh3bWrLZzQTupq6vSVE6XzNwJVKsOHa41GCoevnsWMBNmoDVjXWGqckjuG1g==", + "version": "46.10.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.10.1.tgz", + "integrity": "sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==", "dependencies": { - "@es-joy/jsdoccomment": "~0.37.0", - "comment-parser": "1.3.1", + "@es-joy/jsdoccomment": "~0.41.0", + "are-docs-informative": "^0.0.2", + "comment-parser": "1.4.1", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", - "semver": "^7.3.8", - "spdx-expression-parse": "^3.0.1" + "is-builtin-module": "^3.2.1", + "semver": "^7.5.4", + "spdx-expression-parse": "^4.0.0" }, "engines": { - "node": "^14 || ^16 || ^17 || ^18 || ^19" + "node": ">=16" }, "peerDependencies": { - "eslint": "^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0 || ^9.0.0" } }, "node_modules/eslint-plugin-jsdoc/node_modules/semver": { @@ -4250,6 +4320,14 @@ "integrity": "sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw==", "dev": true }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "engines": { + "node": ">=0.8.x" + } + }, "node_modules/execa": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", @@ -4762,6 +4840,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/google-protobuf": { + "version": "3.21.2", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.2.tgz", + "integrity": "sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==", + "peer": true + }, "node_modules/graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -5024,6 +5108,20 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -5266,6 +5364,14 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, + "node_modules/isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "peerDependencies": { + "ws": "*" + } + }, "node_modules/isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -5894,9 +6000,9 @@ } }, "node_modules/node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "dependencies": { "whatwg-url": "^5.0.0" }, @@ -6883,18 +6989,18 @@ "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" }, "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", "dependencies": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "node_modules/spdx-license-ids": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", - "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==" + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==" }, "node_modules/sprintf-js": { "version": "1.0.3", @@ -7740,6 +7846,26 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "node_modules/ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -8263,11 +8389,11 @@ "integrity": "sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==" }, "@es-joy/jsdoccomment": { - "version": "0.37.1", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.37.1.tgz", - "integrity": "sha512-5vxWJ1gEkEF0yRd0O+uK6dHJf7adrxwQSX8PuRiPfFSAbNLnY0ZJfXaZucoz14Jj2N11xn2DnlEPwWRpYpvRjg==", + "version": "0.41.0", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.41.0.tgz", + "integrity": "sha512-aKUhyn1QI5Ksbqcr3fFJj16p99QdjUxXAEuFst1Z47DRyoiMwivIH9MV/ARcJOCXVjPfjITciej8ZD2O/6qUmw==", "requires": { - "comment-parser": "1.3.1", + "comment-parser": "1.4.1", "esquery": "^1.5.0", "jsdoc-type-pratt-parser": "~4.0.0" } @@ -8281,16 +8407,16 @@ }, "dependencies": { "eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==" + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" } } }, "@eslint-community/regexpp": { - "version": "4.6.2", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.6.2.tgz", - "integrity": "sha512-pPTNuaAG3QMH+buKyBIGJs3g/S5y0caxw0ygM3YyE6yJFySwiGGSzA+mM3KJ8QQvzeLh3blwgSonkFjgQdxzMw==" + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==" }, "@eslint/eslintrc": { "version": "0.4.3", @@ -8329,9 +8455,9 @@ } }, "@eslint/js": { - "version": "8.44.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", - "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==" + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==" }, "@headlessui/react": { "version": "1.6.1", @@ -8359,6 +8485,14 @@ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz", "integrity": "sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==" }, + "@improbable-eng/grpc-web": { + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@improbable-eng/grpc-web/-/grpc-web-0.15.0.tgz", + "integrity": "sha512-ERft9/0/8CmYalqOVnJnpdDry28q+j+nAlFFARdjyxXDJ+Mhgv9+F600QC8BR9ygOfrXRlAk6CvST2j+JCpQPg==", + "requires": { + "browser-headers": "^0.4.1" + } + }, "@isaacs/cliui": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz", @@ -8591,20 +8725,22 @@ } }, "@onflow/config": { - "version": "1.1.1-alpha.0", - "resolved": "https://registry.npmjs.org/@onflow/config/-/config-1.1.1-alpha.0.tgz", - "integrity": "sha512-XuUSXcT2J4BwcJ0c6wpGXTNJqIA/A3VNVpdZVn95nhGy4Sr7qWGnwnNFhTIu++lyvjMQecCS08N2lLgTEeFpbg==", + "version": "1.2.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/config/-/config-1.2.2-alpha.2.tgz", + "integrity": "sha512-4p8bWdvqvTq+hgRsEhRT0EgEY6jzKQiwW6LwOzQQXGljFASm6oZjKGSxYtrPy0fl9cDf9YNd28e5QlXbaLNyIw==", "requires": { "@babel/runtime": "^7.18.6", - "@onflow/util-actor": "^1.2.0", + "@onflow/util-actor": "1.3.2-alpha.2", + "@onflow/util-invariant": "1.2.2-alpha.2", + "@onflow/util-logger": "1.3.2-alpha.2", "eslint": "^8.34.0", - "eslint-plugin-jsdoc": "^40.0.0" + "eslint-plugin-jsdoc": "^46.9.0" }, "dependencies": { "@eslint/eslintrc": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", - "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -8618,19 +8754,24 @@ } }, "@humanwhocodes/config-array": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", - "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", + "version": "0.11.14", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", + "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", "requires": { - "@humanwhocodes/object-schema": "^1.2.1", - "debug": "^4.1.1", + "@humanwhocodes/object-schema": "^2.0.2", + "debug": "^4.3.1", "minimatch": "^3.0.5" } }, + "@humanwhocodes/object-schema": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz", + "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==" + }, "acorn": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", - "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==" + "version": "8.11.3", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz", + "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==" }, "ansi-styles": { "version": "4.3.0", @@ -8668,26 +8809,27 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "eslint": { - "version": "8.45.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.45.0.tgz", - "integrity": "sha512-pd8KSxiQpdYRfYa9Wufvdoct3ZPQQuVuU5O6scNgMuOMYuxvH0IGaYK0wUFjo4UYYQQCUndlXiMbnxopwvvTiw==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "requires": { "@eslint-community/eslint-utils": "^4.2.0", - "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.1.0", - "@eslint/js": "8.44.0", - "@humanwhocodes/config-array": "^0.11.10", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.56.0", + "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", - "ajv": "^6.10.0", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.3.2", "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", - "eslint-scope": "^7.2.0", - "eslint-visitor-keys": "^3.4.1", - "espree": "^9.6.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -8712,18 +8854,18 @@ } }, "eslint-scope": { - "version": "7.2.1", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.1.tgz", - "integrity": "sha512-CvefSOsDdaYYvxChovdrPo/ZGt8d5lrJWleAc1diXRKhHGiTYEI26cvo8Kle/wGnsizoCJjK73FMg1/IkIwiNA==", + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", "requires": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" } }, "eslint-visitor-keys": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.1.tgz", - "integrity": "sha512-pZnmmLwYzf+kWaM/Qgrvpen51upAktaaiI01nsJD/Yr3lMOdNtq0cxkrrg16w64VtisN6okbs7Q8AfGqj4c9fA==" + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==" }, "espree": { "version": "9.6.1", @@ -8753,9 +8895,9 @@ } }, "globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.24.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz", + "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==", "requires": { "type-fest": "^0.20.2" } @@ -8818,33 +8960,49 @@ } }, "@onflow/fcl": { - "version": "1.5.0-alpha.4", - "resolved": "https://registry.npmjs.org/@onflow/fcl/-/fcl-1.5.0-alpha.4.tgz", - "integrity": "sha512-P5PxJ1jIGoZ7ReGKBhftaDEnGD61nll8J3Yg0Eo02GdL4497+A7ULlMcz8slZk15s3+KFZJiQlRmgd5jZXWsjg==", + "version": "1.10.0-alpha.4", + "resolved": "https://registry.npmjs.org/@onflow/fcl/-/fcl-1.10.0-alpha.4.tgz", + "integrity": "sha512-CvyJvxCwTRIwmbv6ftKJ6a/FWRC/F1RNd6RGSoNXD7C3b7CCwLTUuItydmxpNaX+kKFL8MmRo4qsWBjSgqGy0w==", + "requires": { + "@babel/runtime": "^7.18.6", + "@onflow/config": "1.2.2-alpha.2", + "@onflow/fcl-core": "1.8.2-alpha.1", + "@onflow/interaction": "0.0.11", + "@onflow/rlp": "1.2.2-alpha.2", + "@onflow/sdk": "1.4.0-alpha.4", + "@onflow/types": "1.3.0-alpha.2", + "@onflow/util-actor": "1.3.2-alpha.2", + "@onflow/util-address": "1.2.2-alpha.2", + "@onflow/util-invariant": "1.2.2-alpha.2", + "@onflow/util-logger": "1.3.2-alpha.2", + "@onflow/util-semver": "1.0.2-alpha.0", + "@onflow/util-template": "1.2.2-alpha.2", + "@onflow/util-uid": "1.2.2-alpha.2", + "cross-fetch": "^3.1.6", + "events": "^3.3.0", + "sha3": "^2.1.4" + } + }, + "@onflow/fcl-core": { + "version": "1.8.2-alpha.1", + "resolved": "https://registry.npmjs.org/@onflow/fcl-core/-/fcl-core-1.8.2-alpha.1.tgz", + "integrity": "sha512-hBU0R5AvVgsSFGEPpkyQem+lGxeBUKwtyHO2io3nIWze6gygTlWE7BngiDCL0p+fPCWpkpiVdrrPABG31T9VrQ==", "requires": { "@babel/runtime": "^7.18.6", - "@onflow/config": "^1.1.1-alpha.0", + "@improbable-eng/grpc-web": "^0.15.0", + "@onflow/config": "1.2.2-alpha.2", "@onflow/interaction": "0.0.11", - "@onflow/rlp": "^1.1.0", - "@onflow/sdk": "^1.2.1-alpha.0", - "@onflow/types": "^1.1.0", - "@onflow/util-actor": "^1.2.0", - "@onflow/util-address": "^1.1.0", - "@onflow/util-invariant": "^1.1.0", - "@onflow/util-logger": "^1.2.1-alpha.0", - "@onflow/util-template": "^1.1.0", - "@onflow/util-uid": "^1.1.0", + "@onflow/rlp": "1.2.2-alpha.2", + "@onflow/sdk": "1.4.0-alpha.4", + "@onflow/types": "1.3.0-alpha.2", + "@onflow/util-actor": "1.3.2-alpha.2", + "@onflow/util-address": "1.2.2-alpha.2", + "@onflow/util-invariant": "1.2.2-alpha.2", + "@onflow/util-logger": "1.3.2-alpha.2", + "@onflow/util-semver": "1.0.2-alpha.0", + "@onflow/util-template": "1.2.2-alpha.2", + "@onflow/util-uid": "1.2.2-alpha.2", "cross-fetch": "^3.1.6" - }, - "dependencies": { - "@onflow/types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@onflow/types/-/types-1.1.0.tgz", - "integrity": "sha512-UUd2ZAFqdd8BHW//uTg+YRlh3EIH9Na+UYJ9qXpt6y87qjW0Lf4Zkhn6H5IqvhIJsjK17QYnXLFpoXItD/+ToQ==", - "requires": { - "@babel/runtime": "^7.18.6" - } - } } }, "@onflow/interaction": { @@ -8853,118 +9011,130 @@ "integrity": "sha512-Xuq1Mmx6Wyba/F/L+QLQs0yJeQDsIDwy5SKk5vrCuVgIj0yD8k506g5L8ODrbM1LWll8i0tQsoOi0F85vNl5sA==" }, "@onflow/rlp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@onflow/rlp/-/rlp-1.1.0.tgz", - "integrity": "sha512-JJj4dZpKaWmCOXnado+D3RU5xYAXui9kHOmCVfdLReYHIsYBgxwHCDO/hDiQjrbmfLpiybbJKTaIldu+xkCU3Q==", + "version": "1.2.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/rlp/-/rlp-1.2.2-alpha.2.tgz", + "integrity": "sha512-W18UFAE1TXHlyypC1+G4WpUKXjd1IQbx6VaLXFDB1fbYkxuWOkrsKVaLPfKd6Y7/Cij6cNJI4F9J5su4bnUysw==", "requires": { "@babel/runtime": "^7.18.6", "buffer": "^6.0.3" } }, "@onflow/sdk": { - "version": "1.2.1-alpha.1", - "resolved": "https://registry.npmjs.org/@onflow/sdk/-/sdk-1.2.1-alpha.1.tgz", - "integrity": "sha512-4wvlhiIbQ1NuhVsK1SAWtz4MeaXQr3S5qXq51+lEZ/xpKA1Eggnn6SDUhbLeW6eBCxDZef4CbEBx3sQxz2RHSw==", + "version": "1.4.0-alpha.4", + "resolved": "https://registry.npmjs.org/@onflow/sdk/-/sdk-1.4.0-alpha.4.tgz", + "integrity": "sha512-5GskQh8d2vGci/gadoDIqQgLnJpXGxySrFueU2SL6trMsZyoIe3D2dP2rbHhYyB392bcornV0fao/J1MH/cn2w==", "requires": { "@babel/runtime": "^7.18.6", - "@onflow/config": "^1.1.1-alpha.0", - "@onflow/rlp": "^1.1.0", - "@onflow/transport-http": "^1.7.0-alpha.0", - "@onflow/util-actor": "^1.2.0", - "@onflow/util-address": "^1.1.0", - "@onflow/util-invariant": "^1.1.0", - "@onflow/util-logger": "^1.2.1-alpha.0", - "@onflow/util-template": "^1.1.0", + "@onflow/config": "1.2.2-alpha.2", + "@onflow/rlp": "1.2.2-alpha.2", + "@onflow/transport-http": "1.10.0-alpha.3", + "@onflow/typedefs": "1.3.0-alpha.2", + "@onflow/util-actor": "1.3.2-alpha.2", + "@onflow/util-address": "1.2.2-alpha.2", + "@onflow/util-invariant": "1.2.2-alpha.2", + "@onflow/util-logger": "1.3.2-alpha.2", + "@onflow/util-template": "1.2.2-alpha.2", "deepmerge": "^4.2.2", - "sha3": "^2.1.4" + "events": "^3.3.0", + "sha3": "^2.1.4", + "uuid": "^9.0.1" + }, + "dependencies": { + "uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==" + } } }, "@onflow/transport-http": { - "version": "1.7.0-alpha.0", - "resolved": "https://registry.npmjs.org/@onflow/transport-http/-/transport-http-1.7.0-alpha.0.tgz", - "integrity": "sha512-g3m78rOeRnkkk18lumjdQ4vuKbfWXwfn2NNNoEI73V6L7nKlKOVePJrqSrBwI/lWG2z+j58FIpu0cHHqCsUqXg==", + "version": "1.10.0-alpha.3", + "resolved": "https://registry.npmjs.org/@onflow/transport-http/-/transport-http-1.10.0-alpha.3.tgz", + "integrity": "sha512-aruhfGIDdTomrzekDFd5oAM7Q5fJO0htTwuyz7mOc57gOxN00/CjJF05dianlBBdPP1NGUcuqynsZ6PX3cSDjQ==", "requires": { "@babel/runtime": "^7.18.6", - "@onflow/util-address": "^1.1.0", - "@onflow/util-invariant": "^1.1.0", - "@onflow/util-logger": "^1.2.1-alpha.0", - "@onflow/util-template": "^1.1.0", + "@onflow/util-address": "1.2.2-alpha.2", + "@onflow/util-invariant": "1.2.2-alpha.2", + "@onflow/util-logger": "1.3.2-alpha.2", + "@onflow/util-template": "1.2.2-alpha.2", "abort-controller": "^3.0.0", - "cross-fetch": "^3.1.6" + "cross-fetch": "^3.1.6", + "events": "^3.3.0", + "isomorphic-ws": "^5.0.0", + "ws": "^8.14.2" + } + }, + "@onflow/typedefs": { + "version": "1.3.0-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/typedefs/-/typedefs-1.3.0-alpha.2.tgz", + "integrity": "sha512-boy22ChDls+76inLpr/JPHsvkEsS02374oPdHaFy06peUqfGGrMly7lxL2e/54oqUcZA9F0wCS53OeVrXnCwjw==", + "requires": { + "@babel/runtime": "^7.18.6" } }, "@onflow/types": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@onflow/types/-/types-0.0.4.tgz", - "integrity": "sha512-47r0qTM45mR7FSvyEE0njGljkpgy3MCf/2W82pfZ/PTFGWr1nsGV/4j2bUfK9Sry4Ymz2W20iRZVP3xpqOhqGw==" + "version": "1.3.0-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/types/-/types-1.3.0-alpha.2.tgz", + "integrity": "sha512-D1fp6/+UmNkTyKuyBIFmf182cRkq3Yjo9bgUEbipjX254KwSPVYcprHLR71JGdbcN5RuzvW07XHj2Q2VUX9PGw==", + "requires": { + "@babel/runtime": "^7.18.6", + "@onflow/util-logger": "1.3.2-alpha.2" + } }, "@onflow/util-actor": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-1.2.0.tgz", - "integrity": "sha512-voyHXE3qYNC+P75vzv55pGDDwpxxWKWH0aToR/3g9Bq8nKGcGoszxaMJkVy+fKX1akfdT0yKr/GxXRkjCS9SBg==", + "version": "1.3.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/util-actor/-/util-actor-1.3.2-alpha.2.tgz", + "integrity": "sha512-oVuYidjtujVzaSZ5PgSGM7G4OJ5MYxpttnFxuRnKLizulGsOi+qqfuFW40HxyzhZHWOp+2lnkt9Fqk6s+cuDDA==", "requires": { "@babel/runtime": "^7.18.6", "queue-microtask": "1.2.3" } }, "@onflow/util-address": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@onflow/util-address/-/util-address-1.1.0.tgz", - "integrity": "sha512-HhJOIfNaYAoeYuTNUe85jt4fqnJhFmSbYqyufiJBrplwd3eKmNsan0NYvVYO4U1ecu3KyuY4D9R/NtjGpHjMlA==", + "version": "1.2.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/util-address/-/util-address-1.2.2-alpha.2.tgz", + "integrity": "sha512-Fup1GkMwurljMHTNUcP6UqP/ln+XwnKE8cWjiPiaCnK4NJMrU4jaobrc6aEbZoYIrj8suklfrjvHUuCZ+7DGfQ==", "requires": { "@babel/runtime": "^7.18.6" } }, - "@onflow/util-encode-key": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/@onflow/util-encode-key/-/util-encode-key-0.0.2.tgz", - "integrity": "sha512-gY9H4f1USijXbgk6IoNibAibF8VB6spZgq2fdkxA9PKgKay6UjolnsKTvIkA0k4/CIiODQIh5ziL069mrRjOJw==", + "@onflow/util-invariant": { + "version": "1.2.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/util-invariant/-/util-invariant-1.2.2-alpha.2.tgz", + "integrity": "sha512-m7PqZ6RQ4QecpFiYSKMoghT2iT9ceza/qv8Usw2csntcUWOkA+x2hxKh/pUoa8LGK5054gemfNtFac2J9cPOKw==", "requires": { - "@onflow/rlp": "0.0.3", - "@onflow/util-invariant": "0.0.0" - }, - "dependencies": { - "@onflow/rlp": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@onflow/rlp/-/rlp-0.0.3.tgz", - "integrity": "sha512-oAf0VEiMjX8eC6Vd66j1BdGYTHOM6UBaS/sLSScnc7bKX5gICqe2gtEsCeJVE9rUzRk3GD3JqXRnPAW6YFWd/Q==" - }, - "@onflow/util-invariant": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/@onflow/util-invariant/-/util-invariant-0.0.0.tgz", - "integrity": "sha512-ZCt+NqLdeHt9tZhb0DGxo6iSIS9oNUpLkd0PEMzUYUHr4UwrUO7VruV1AUW3PaF9V78DZ13fNZUiQEzdF76O/w==" - } + "@babel/runtime": "^7.18.6" } }, - "@onflow/util-invariant": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@onflow/util-invariant/-/util-invariant-1.1.0.tgz", - "integrity": "sha512-5uxweKl5tqeqB1QLzs3dWWLtpNo7H4PgcmgnRIcC2oItAkELcnVCybDdlfYjKB4n/dlg3rIym8cJQE2tBeOpZQ==", + "@onflow/util-logger": { + "version": "1.3.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/util-logger/-/util-logger-1.3.2-alpha.2.tgz", + "integrity": "sha512-6mLXIp/7n3bmaxVJcGZVQ0rrJipM6pKEkmH752VTzn8ObXM3HtV91ee86GlY0pH1r64ntnsa+KvOhpmo1kMT8A==", "requires": { "@babel/runtime": "^7.18.6" } }, - "@onflow/util-logger": { - "version": "1.2.1-alpha.0", - "resolved": "https://registry.npmjs.org/@onflow/util-logger/-/util-logger-1.2.1-alpha.0.tgz", - "integrity": "sha512-JJ0p3O/JoKQzWdyFo4ZNMZ/gGwHrV3k0GoxF/pp6A8ghlNJgNTMgrF7mz3J+nsznaDqXJKGYi7YdcEIH5Rmesg==", + "@onflow/util-semver": { + "version": "1.0.2-alpha.0", + "resolved": "https://registry.npmjs.org/@onflow/util-semver/-/util-semver-1.0.2-alpha.0.tgz", + "integrity": "sha512-q+Y8FnQSPiK9911rNXWkNWNQhtLvBQgnROTIxxmi21PUaf5m5QAj/kuZ8SI4LOh0GcdP+QHvv9LzoBkQiSk2Tg==", "requires": { - "@babel/runtime": "^7.18.6", - "@onflow/config": "^1.1.1-alpha.0" + "@babel/runtime": "^7.18.6" } }, "@onflow/util-template": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@onflow/util-template/-/util-template-1.1.0.tgz", - "integrity": "sha512-gGqJJH5OTPPRmHk6YxMw4t5Ecy7iHnj00ZlCE7lnlOnpGUNdHrNNfoeE//hO8TBGNNVpOkEQERWiLDph+/oIxg==", + "version": "1.2.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/util-template/-/util-template-1.2.2-alpha.2.tgz", + "integrity": "sha512-p+jS1ORr1urEeU7AfoqpP3uOaEgulKrjCOAf4FciyAXo1Dod/+JjPwewW/gv3Yk5fE6TlP9sx74Dg/zLsEAEAQ==", "requires": { - "@babel/runtime": "^7.18.6" + "@babel/runtime": "^7.18.6", + "@onflow/util-logger": "1.3.2-alpha.2" } }, "@onflow/util-uid": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@onflow/util-uid/-/util-uid-1.1.0.tgz", - "integrity": "sha512-HmWfKCOXoz1/TIu7fRx6iR7Nfhq6q5Tmn4YWc868SIfFeWv/inpvVJyrKX0nORf87csSnRSqdDzrJGBowgcXVA==", + "version": "1.2.2-alpha.2", + "resolved": "https://registry.npmjs.org/@onflow/util-uid/-/util-uid-1.2.2-alpha.2.tgz", + "integrity": "sha512-GUYPQL47FprUWlGHIXQsfoifcAvX9OA1S+wszVHikaH+F4zheWoCJd7EIfojEPEv66CS2aBwcKIbT/z73os9UQ==", "requires": { "@babel/runtime": "^7.18.6" } @@ -9427,6 +9597,11 @@ "eslint-visitor-keys": "^2.0.0" } }, + "@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==" + }, "abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", @@ -9500,6 +9675,11 @@ "integrity": "sha512-Of/R0wqp83cgHozfIYLbBMnej79U/SVGOOyuB3VVFv1NRM/PSFMK12x9KVtiYzJqmnU5WR2qp0Z5rHb7sWGnFQ==", "dev": true }, + "are-docs-informative": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/are-docs-informative/-/are-docs-informative-0.0.2.tgz", + "integrity": "sha512-ixiS0nLNNG5jNQzgZJNoUpBKdo9yTYZMGJ+QgT2jmjR7G7+QHRCc4v6LQ3NgE7EBJq+o0ams3waJwkrlBom8Ig==" + }, "argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -9743,6 +9923,11 @@ "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", "integrity": "sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==" }, + "browser-headers": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/browser-headers/-/browser-headers-0.4.1.tgz", + "integrity": "sha512-CA9hsySZVo9371qEHjHZtYxV2cFtVj5Wj/ZHi8ooEsrtm4vOnl9Y9HmyYWk9q+05d7K3rdoAE0j3MVEFVvtQtg==" + }, "browserslist": { "version": "4.21.4", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.4.tgz", @@ -9770,6 +9955,11 @@ "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", "dev": true }, + "builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==" + }, "cachedir": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/cachedir/-/cachedir-2.3.0.tgz", @@ -9917,9 +10107,9 @@ "dev": true }, "comment-parser": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", - "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.1.tgz", + "integrity": "sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==" }, "common-tags": { "version": "1.8.2", @@ -10708,17 +10898,19 @@ } }, "eslint-plugin-jsdoc": { - "version": "40.3.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-40.3.0.tgz", - "integrity": "sha512-EhCqpzRkxoT2DUB4AnrU0ggBYvTh3bWrLZzQTupq6vSVE6XzNwJVKsOHa41GCoevnsWMBNmoDVjXWGqckjuG1g==", + "version": "46.10.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.10.1.tgz", + "integrity": "sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==", "requires": { - "@es-joy/jsdoccomment": "~0.37.0", - "comment-parser": "1.3.1", + "@es-joy/jsdoccomment": "~0.41.0", + "are-docs-informative": "^0.0.2", + "comment-parser": "1.4.1", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", - "semver": "^7.3.8", - "spdx-expression-parse": "^3.0.1" + "is-builtin-module": "^3.2.1", + "semver": "^7.5.4", + "spdx-expression-parse": "^4.0.0" }, "dependencies": { "semver": { @@ -10899,6 +11091,11 @@ "integrity": "sha512-bXE7Dyc1i6oQElDG0jMRZJrRAn9QR2xyyFGmBdZleNmyQX0FqGYmhZIrIrpPfm/w//LTo4tVQGOGQcGCb5q9uw==", "dev": true }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==" + }, "execa": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", @@ -11282,6 +11479,12 @@ "slash": "^3.0.0" } }, + "google-protobuf": { + "version": "3.21.2", + "resolved": "https://registry.npmjs.org/google-protobuf/-/google-protobuf-3.21.2.tgz", + "integrity": "sha512-3MSOYFO5U9mPGikIYCzK0SaThypfGgS6bHqrUGXG3DPHCrb+txNqeEcns1W0lkGfk0rCyNXm7xB9rMxnCiZOoA==", + "peer": true + }, "graceful-fs": { "version": "4.2.10", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", @@ -11472,6 +11675,14 @@ "has-tostringtag": "^1.0.0" } }, + "is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "requires": { + "builtin-modules": "^3.3.0" + } + }, "is-callable": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", @@ -11627,6 +11838,12 @@ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" }, + "isomorphic-ws": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-5.0.0.tgz", + "integrity": "sha512-muId7Zzn9ywDsyXgTIafTry2sV3nySZeUDe6YedVd1Hvuuep5AsIlqK+XefWpYTyJG5e503F2xIuT2lcU6rCSw==", + "requires": {} + }, "isstream": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", @@ -12095,9 +12312,9 @@ } }, "node-fetch": { - "version": "2.6.12", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.12.tgz", - "integrity": "sha512-C/fGU2E8ToujUivIO0H+tpQ6HWo4eEmchoPIoXtxCrVghxdKq+QOHqEZW7tuP3KlV3bC8FRMO5nMCC7Zm1VP6g==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", "requires": { "whatwg-url": "^5.0.0" } @@ -12799,18 +13016,18 @@ "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==" }, "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-4.0.0.tgz", + "integrity": "sha512-Clya5JIij/7C6bRR22+tnGXbc4VKlibKSVj2iHvVeX5iMW7s1SIQlqu699JkODJJIhh/pUu8L0/VLh8xflD+LQ==", "requires": { "spdx-exceptions": "^2.1.0", "spdx-license-ids": "^3.0.0" } }, "spdx-license-ids": { - "version": "3.0.13", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", - "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==" + "version": "3.0.16", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz", + "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==" }, "sprintf-js": { "version": "1.0.3", @@ -13443,6 +13660,12 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "ws": { + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", + "requires": {} + }, "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", diff --git a/package.json b/package.json index 724e05b..118ce0d 100644 --- a/package.json +++ b/package.json @@ -24,9 +24,8 @@ "@headlessui/react": "^1.3.0", "@mdx-js/react": "^1.6.22", "@monaco-editor/react": "^4.2.1", - "@onflow/fcl": "^1.5.0-alpha.4", - "@onflow/types": "^0.0.4", - "@onflow/util-encode-key": "^0.0.2", + "@onflow/fcl": "^1.10.0-alpha.4", + "@onflow/types": "^1.3.0-alpha.2", "@theme-ui/color": "^0.14.5", "@theme-ui/css": "^0.14.5", "@theme-ui/match-media": "^0.14.5", diff --git a/src/crypto.ts b/src/crypto.ts index 2e07f6b..a31dc9a 100644 --- a/src/crypto.ts +++ b/src/crypto.ts @@ -1,13 +1,23 @@ -import {ECDSA_P256, encodeKey, SHA3_256} from "@onflow/util-encode-key" import {ec as EC} from "elliptic" import {SHA3} from "sha3" -const ec = new EC("p256") +export enum HashAlgorithm { + SHA2_256 = 1, + SHA2_384 = 2, + SHA3_256 = 3, + SHA3_384 = 4, + KMAC128_BLS_BLS12_381 = 5, + KECCAK_256 = 6, +} -export const encodeServiceKey = (flowAccountPublicKey: string) => { - return encodeKey(flowAccountPublicKey, ECDSA_P256, SHA3_256, 1000) +export enum SignAlgorithm { + ECDSA_P256 = 1, + ECDSA_secp256k1 = 2, + BLS_BLS12_381 = 3, } +const ec = new EC("p256") + const hashMsgHex = (msgHex: string) => { const sha = new SHA3(256) sha.update(Buffer.from(msgHex, "hex")) diff --git a/src/init.ts b/src/init.ts index 294a5dd..211fc5f 100644 --- a/src/init.ts +++ b/src/init.ts @@ -5,7 +5,7 @@ import initTransaction from "cadence/transactions/init.cdc" import {accountLabelGenerator} from "src/accountGenerator" import {authz} from "src/authz" import {SERVICE_ACCOUNT_LABEL} from "src/constants" -import {encodeServiceKey} from "src/crypto" +import {HashAlgorithm, SignAlgorithm} from "src/crypto" async function isInitialized(flowAccountAddress: string): Promise { try { @@ -61,7 +61,9 @@ export async function initializeWallet(config: { fcl.transaction(initTransaction), fcl.args([ fcl.arg(FCLContract, t.String), - fcl.arg(encodeServiceKey(flowAccountPublicKey), t.String), + fcl.arg(flowAccountPublicKey, t.String), + fcl.arg(HashAlgorithm.SHA3_256, t.UInt8), + fcl.arg(SignAlgorithm.ECDSA_P256, t.UInt8), fcl.arg(initAccountsLabels, t.Array(t.String)), ]), fcl.proposer(authorization),