diff --git a/package-lock.json b/package-lock.json index 8bf85f01..6c4d4550 100644 --- a/package-lock.json +++ b/package-lock.json @@ -26826,7 +26826,7 @@ }, "packages/auth": { "name": "@mintbase-js/auth", - "version": "0.6.0-beta.1", + "version": "0.6.0-beta-prerelease.0", "license": "MIT", "dependencies": { "@mintbase-js/sdk": "0.5.2-beta.0", @@ -26885,7 +26885,7 @@ }, "packages/data": { "name": "@mintbase-js/data", - "version": "0.6.0-beta.1", + "version": "0.6.0-beta-prerelease.0", "license": "MIT", "dependencies": { "@mintbase-js/sdk": "^0.5.2-beta.0", @@ -26917,7 +26917,7 @@ }, "packages/react": { "name": "@mintbase-js/react", - "version": "0.6.0-beta.1", + "version": "0.6.0-beta-prerelease.0", "license": "MIT", "dependencies": { "@mintbase-js/wallet": "0.6.0-beta.0", @@ -27296,7 +27296,7 @@ }, "packages/rpc": { "name": "@mintbase-js/rpc", - "version": "0.6.0-beta.1", + "version": "0.6.0-beta-prerelease.0", "license": "MIT", "dependencies": { "@mintbase-js/sdk": "0.5.6-rpc-fix-1aec566.0", @@ -27327,7 +27327,7 @@ }, "packages/sdk": { "name": "@mintbase-js/sdk", - "version": "0.6.0-beta.1", + "version": "0.6.0-beta-prerelease.0", "license": "MIT", "dependencies": { "bn.js": "5.2.1", @@ -27354,7 +27354,7 @@ }, "packages/storage": { "name": "@mintbase-js/storage", - "version": "0.6.0-beta.1", + "version": "0.6.0-beta-prerelease.0", "license": "MIT", "dependencies": { "@mintbase-js/sdk": "0.5.2-beta.0", @@ -27389,12 +27389,12 @@ }, "packages/testing": { "name": "@mintbase-js/testing", - "version": "0.6.0-beta.1", + "version": "0.6.0-beta-prerelease.0", "license": "MIT", "dependencies": { "@google-cloud/firestore": "^6.8.0", "@google-cloud/secret-manager": "^4.2.2", - "@mintbase-js/auth": "^0.6.0-beta.1", + "@mintbase-js/auth": "^0.6.0-beta-prerelease.0", "@mintbase-js/sdk": "^0.3.2-upgrade-packages-3378beb.0", "graphql-request": "^5.2.0" }, @@ -27464,158 +27464,135 @@ }, "packages/wallet": { "name": "@mintbase-js/wallet", - "version": "0.6.0-beta.1", + "version": "0.5.9-beta-prerelease.2", "license": "MIT", "dependencies": { "@near-wallet-selector/core": "8.9.5", "@near-wallet-selector/wallet-utils": "^8.9.5", "bn.js": "^5.2.1", - "near-api-js": "3.0.3" + "near-api-js": "^2.1.3" + }, + "peerDependencies": { + "near-api-js": "^2.0.0" } }, "packages/wallet/node_modules/@near-js/accounts": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/@near-js/accounts/-/accounts-1.0.3.tgz", - "integrity": "sha512-8/oSXTlKlhJzsoiWw1g8BnenFIZDj6GC7c6g4KM4gSoMlvVEep1QkV3puCl9o4KvH0FQt3o4ykdhSeHRwPTttw==", + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@near-js/accounts/-/accounts-0.1.3.tgz", + "integrity": "sha512-rmS1/WwIAWlfSMxHlDN3Q0YLOAscfrU+fkg9PsNI0sdzvdJ+bmiFqAoXi6L3D3KWZemteIudVEXMcegjreHnMg==", "dependencies": { - "@near-js/crypto": "1.2.1", - "@near-js/providers": "0.1.0", - "@near-js/signers": "0.1.1", - "@near-js/transactions": "1.1.1", + "@near-js/crypto": "0.0.4", + "@near-js/providers": "0.0.6", + "@near-js/signers": "0.0.4", + "@near-js/transactions": "0.2.0", "@near-js/types": "0.0.4", - "@near-js/utils": "0.1.0", - "ajv": "8.11.2", - "ajv-formats": "2.1.1", + "@near-js/utils": "0.0.4", + "ajv": "^8.11.2", + "ajv-formats": "^2.1.1", "bn.js": "5.2.1", - "borsh": "1.0.0", - "depd": "2.0.0", - "lru_map": "0.4.1", + "borsh": "^0.7.0", + "depd": "^2.0.0", "near-abi": "0.1.1" } }, "packages/wallet/node_modules/@near-js/crypto": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@near-js/crypto/-/crypto-1.2.1.tgz", - "integrity": "sha512-iJOHaGKvdudYfR8nEtRhGlgcTEHeVmxMoT0JVXmuP3peG96v/sSnA03CE6MZBeCC8txKAQOffagxE7oU6hJp9g==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@near-js/crypto/-/crypto-0.0.4.tgz", + "integrity": "sha512-2mSIVv6mZway1rQvmkktrXAFoUvy7POjrHNH3LekKZCMCs7qMM/23Hz2+APgxZPqoV2kjarSNOEYJjxO7zQ/rQ==", "dependencies": { "@near-js/types": "0.0.4", - "@near-js/utils": "0.1.0", - "@noble/curves": "1.2.0", "bn.js": "5.2.1", - "borsh": "1.0.0", - "randombytes": "2.1.0" + "borsh": "^0.7.0", + "tweetnacl": "^1.0.1" } }, "packages/wallet/node_modules/@near-js/keystores": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/@near-js/keystores/-/keystores-0.0.9.tgz", - "integrity": "sha512-j8ySgVEcm2Gg6zxkSdadNtPlIqhJZdPGfWWM3tPtEoowNS9snhwZn5NRFPrgmX0+MzpF7E091CRcY90MvRVhsg==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@near-js/keystores/-/keystores-0.0.4.tgz", + "integrity": "sha512-+vKafmDpQGrz5py1liot2hYSjPGXwihveeN+BL11aJlLqZnWBgYJUWCXG+uyGjGXZORuy2hzkKK6Hi+lbKOfVA==", "dependencies": { - "@near-js/crypto": "1.2.1", + "@near-js/crypto": "0.0.4", "@near-js/types": "0.0.4" } }, "packages/wallet/node_modules/@near-js/keystores-browser": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/@near-js/keystores-browser/-/keystores-browser-0.0.9.tgz", - "integrity": "sha512-JzPj+RHJN2G3CEm/LyfbtZDQy/wxgOlqfh52voqPGijUHg93b27KBqtZShazAgJNkhzRbWcoluWQnd2jL8vF7A==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@near-js/keystores-browser/-/keystores-browser-0.0.4.tgz", + "integrity": "sha512-bzwClm3jNlWJrb8wqMunP3rrcG1hS3rD58KKhDvHXy8Dtg9VVUgrfr3Csu9oTnjG+rAPZGOynunaoOQVqju/Aw==", "dependencies": { - "@near-js/crypto": "1.2.1", - "@near-js/keystores": "0.0.9" + "@near-js/crypto": "0.0.4", + "@near-js/keystores": "0.0.4" } }, "packages/wallet/node_modules/@near-js/keystores-node": { - "version": "0.0.9", - "resolved": "https://registry.npmjs.org/@near-js/keystores-node/-/keystores-node-0.0.9.tgz", - "integrity": "sha512-2B9MYz6uIhysG1fhQSjvaPYCM7gM+UAeDchX0J8QRauXIeN8TGzpcdgkdkMUnWNTIdt3Iblh0ZuCs+FY02dTXg==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@near-js/keystores-node/-/keystores-node-0.0.4.tgz", + "integrity": "sha512-vOdVhAuQ8BVefEluj+TSNzjXHA/1xjEgK7pwBUA1kgpcY8/hZ0Jj4PcvPD17wQNSyP+NJF5H9ed3pP2h2VH+1A==", "dependencies": { - "@near-js/crypto": "1.2.1", - "@near-js/keystores": "0.0.9" + "@near-js/crypto": "0.0.4", + "@near-js/keystores": "0.0.4" } }, "packages/wallet/node_modules/@near-js/providers": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@near-js/providers/-/providers-0.1.0.tgz", - "integrity": "sha512-NUulR6rUwj2BIufM/9/eWopGwQr/6SyL6B62F/oIRN3o2l57m6jzeN3Z8vG0hJMt4ax3TnEU0QDZ7xnaWy1RLA==", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@near-js/providers/-/providers-0.0.6.tgz", + "integrity": "sha512-PgWCcgDgCAgnyxq2IPZD2vbpQzXt4XK4cN2SbUZsDwJkBaDQEozXMnyShG/Ie2eRoz5aD9dRHpdLDpTieAw5kA==", "dependencies": { - "@near-js/transactions": "1.1.1", + "@near-js/transactions": "0.2.0", "@near-js/types": "0.0.4", - "@near-js/utils": "0.1.0", + "@near-js/utils": "0.0.4", "bn.js": "5.2.1", - "borsh": "1.0.0", - "http-errors": "1.7.2" + "borsh": "^0.7.0", + "http-errors": "^1.7.2" }, "optionalDependencies": { - "node-fetch": "2.6.7" + "node-fetch": "^2.6.1" } }, "packages/wallet/node_modules/@near-js/signers": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@near-js/signers/-/signers-0.1.1.tgz", - "integrity": "sha512-focJgs04dBUfawMnyGg3yIjaMawuVz2OeLRKC4t5IQDmO4PLfdIraEuwgS7tckMq3GdrJ7nqkwkpSNYpdt7I5Q==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@near-js/signers/-/signers-0.0.4.tgz", + "integrity": "sha512-xCglo3U/WIGsz/izPGFMegS5Q3PxOHYB8a1E7RtVhNm5QdqTlQldLCm/BuMg2G/u1l1ZZ0wdvkqRTG9joauf3Q==", "dependencies": { - "@near-js/crypto": "1.2.1", - "@near-js/keystores": "0.0.9", - "@noble/hashes": "1.3.3" + "@near-js/crypto": "0.0.4", + "@near-js/keystores": "0.0.4", + "js-sha256": "^0.9.0" } }, "packages/wallet/node_modules/@near-js/transactions": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@near-js/transactions/-/transactions-1.1.1.tgz", - "integrity": "sha512-C3oNEUDkAwhactTLZ1/VxOu9i+xi0j4ceG6Qoqkm4hlLVPHYx1u9L8oTtlEccXnNpqv/Ey3dcgBRJu/TKPFoEg==", - "dependencies": { - "@near-js/crypto": "1.2.1", - "@near-js/signers": "0.1.1", - "@near-js/types": "0.0.4", - "@near-js/utils": "0.1.0", - "@noble/hashes": "1.3.3", - "bn.js": "5.2.1", - "borsh": "1.0.0" - } - }, - "packages/wallet/node_modules/@near-js/utils": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@near-js/utils/-/utils-0.1.0.tgz", - "integrity": "sha512-kOVAXmJzaC8ElJD3RLEoBuqOK+d5s7jc0JkvhyEtbuEmXYHHAy9Q17/YkDcX9tyr01L85iOt66z0cODqzgtQwA==", + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@near-js/transactions/-/transactions-0.2.0.tgz", + "integrity": "sha512-ejcYkDz0tdQ40i/7ETV23fL5hp/pIiNXYmh4bNuZ9FjeowBODtlXGLqjG3wZbCygHCirJKilmVi5BtM+rh4ovQ==", "dependencies": { + "@near-js/crypto": "0.0.4", + "@near-js/signers": "0.0.4", "@near-js/types": "0.0.4", + "@near-js/utils": "0.0.4", "bn.js": "5.2.1", - "bs58": "4.0.0", - "depd": "2.0.0", - "mustache": "4.0.0" + "borsh": "^0.7.0", + "js-sha256": "^0.9.0" } }, "packages/wallet/node_modules/@near-js/wallet-account": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@near-js/wallet-account/-/wallet-account-1.1.0.tgz", - "integrity": "sha512-iwB5hy8OokdAejgwFzAPJ5yR1zsg9u0RVdMJVCBAzSrSm5OhvrN7Goe24s/F2YfN4L3xQBVo39cZJK9366qdqw==", - "dependencies": { - "@near-js/accounts": "1.0.3", - "@near-js/crypto": "1.2.1", - "@near-js/keystores": "0.0.9", - "@near-js/signers": "0.1.1", - "@near-js/transactions": "1.1.1", + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/@near-js/wallet-account/-/wallet-account-0.0.6.tgz", + "integrity": "sha512-oyxQM6tf2WG4it+8IMu0ZQ6pa4OQhF1o+Q33Rb2+4Mb1Fm+L7MO7PJoCPcveCIFYVPOjSVk0oyoz1KbE3y62gA==", + "dependencies": { + "@near-js/accounts": "0.1.3", + "@near-js/crypto": "0.0.4", + "@near-js/keystores": "0.0.4", + "@near-js/signers": "0.0.4", + "@near-js/transactions": "0.2.0", "@near-js/types": "0.0.4", - "@near-js/utils": "0.1.0", + "@near-js/utils": "0.0.4", "bn.js": "5.2.1", - "borsh": "1.0.0" - } - }, - "packages/wallet/node_modules/@noble/hashes": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.3.3.tgz", - "integrity": "sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" + "borsh": "^0.7.0" } }, "packages/wallet/node_modules/ajv": { - "version": "8.11.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.11.2.tgz", - "integrity": "sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg==", + "version": "8.12.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", + "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", "dependencies": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", @@ -27627,151 +27604,37 @@ "url": "https://github.com/sponsors/epoberezkin" } }, - "packages/wallet/node_modules/base-x": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/base-x/-/base-x-2.0.6.tgz", - "integrity": "sha512-UAmjxz9KbK+YIi66xej+pZVo/vxUOh49ubEvZW5egCbxhur05pBb+hwuireQwKO4nDpsNm64/jEei17LEpsr5g==", - "deprecated": "use 3.0.0 instead, safe-buffer has been merged and release for compatability", - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": ">=4.5.0" - } - }, - "packages/wallet/node_modules/borsh": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/borsh/-/borsh-1.0.0.tgz", - "integrity": "sha512-fSVWzzemnyfF89EPwlUNsrS5swF5CrtiN4e+h0/lLf4dz2he4L3ndM20PS9wj7ICSkXJe/TQUHdaPTq15b1mNQ==" - }, - "packages/wallet/node_modules/bs58": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-4.0.0.tgz", - "integrity": "sha512-/jcGuUuSebyxwLLfKrbKnCJttxRf9PM51EnHTwmFKBxl4z1SGkoAhrfd6uZKE0dcjQTfm6XzTP8DPr1tzE4KIw==", - "dependencies": { - "base-x": "^2.0.1" - } - }, - "packages/wallet/node_modules/http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "packages/wallet/node_modules/http-errors/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "engines": { - "node": ">= 0.6" - } - }, - "packages/wallet/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==" - }, "packages/wallet/node_modules/json-schema-traverse": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, - "packages/wallet/node_modules/mustache": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.0.0.tgz", - "integrity": "sha512-FJgjyX/IVkbXBXYUwH+OYwQKqWpFPLaLVESd70yHjSDunwzV2hZOoTBvPf4KLoxesUzzyfTH6F784Uqd7Wm5yA==", - "bin": { - "mustache": "bin/mustache" - }, - "engines": { - "npm": ">=1.4.0" - } - }, "packages/wallet/node_modules/near-api-js": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/near-api-js/-/near-api-js-3.0.3.tgz", - "integrity": "sha512-pQhDytWpOM6hxPJ6mCe9tgGKtMwAK9bM2/YnGvBfkRgokSm4US0K0lnqHwEG+g4+6HxRme6SOou1tuAyXdoTsQ==", - "dependencies": { - "@near-js/accounts": "1.0.3", - "@near-js/crypto": "1.2.1", - "@near-js/keystores": "0.0.9", - "@near-js/keystores-browser": "0.0.9", - "@near-js/keystores-node": "0.0.9", - "@near-js/providers": "0.1.0", - "@near-js/signers": "0.1.1", - "@near-js/transactions": "1.1.1", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/near-api-js/-/near-api-js-2.1.3.tgz", + "integrity": "sha512-ggCQE/oGrrbr9dEtXZ9QU7XAf6RgISs+bfD7Q5I2QsQN45XgV85IA4c8KDLzo66u7FTX39gubKz3Ghieo6D7YA==", + "dependencies": { + "@near-js/accounts": "0.1.3", + "@near-js/crypto": "0.0.4", + "@near-js/keystores": "0.0.4", + "@near-js/keystores-browser": "0.0.4", + "@near-js/keystores-node": "0.0.4", + "@near-js/providers": "0.0.6", + "@near-js/signers": "0.0.4", + "@near-js/transactions": "0.2.0", "@near-js/types": "0.0.4", - "@near-js/utils": "0.1.0", - "@near-js/wallet-account": "1.1.0", - "@noble/curves": "1.2.0", - "ajv": "8.11.2", - "ajv-formats": "2.1.1", + "@near-js/utils": "0.0.4", + "@near-js/wallet-account": "0.0.6", + "ajv": "^8.11.2", + "ajv-formats": "^2.1.1", "bn.js": "5.2.1", - "borsh": "1.0.0", - "depd": "2.0.0", - "http-errors": "1.7.2", + "borsh": "^0.7.0", + "depd": "^2.0.0", + "error-polyfill": "^0.1.3", + "http-errors": "^1.7.2", "near-abi": "0.1.1", - "node-fetch": "2.6.7" - } - }, - "packages/wallet/node_modules/node-fetch": { - "version": "2.6.7", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", - "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "packages/wallet/node_modules/setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" - }, - "packages/wallet/node_modules/toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", - "engines": { - "node": ">=0.6" - } - }, - "packages/wallet/node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==" - }, - "packages/wallet/node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==" - }, - "packages/wallet/node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" + "node-fetch": "^2.6.1", + "tweetnacl": "^1.0.1" } } } diff --git a/packages/wallet/package-lock.json b/packages/wallet/package-lock.json index cb566c96..d12e5436 100644 --- a/packages/wallet/package-lock.json +++ b/packages/wallet/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@near-wallet-selector/core": "8.9.5", "bn.js": "^5.2.1", - "near-api-js": "3.0.3" + "near-api-js": "^2.0.0" } }, "node_modules/@near-js/accounts": { diff --git a/packages/wallet/package.json b/packages/wallet/package.json index 5f856e14..6dccfd5c 100644 --- a/packages/wallet/package.json +++ b/packages/wallet/package.json @@ -1,6 +1,6 @@ { "name": "@mintbase-js/wallet", - "version": "0.6.0-beta-prerelease.0", + "version": "0.5.9-beta-prerelease.2", "description": "Mintbase Wallet", "main": "lib/index.js", "keywords": [ @@ -16,6 +16,9 @@ "@near-wallet-selector/core": "8.9.5", "@near-wallet-selector/wallet-utils": "^8.9.5", "bn.js": "^5.2.1", - "near-api-js": "3.0.3" + "near-api-js": "^2.1.3" + }, + "peerDependencies": { + "near-api-js": "^2.0.0" } } diff --git a/packages/wallet/src/mintbase-wallet.ts b/packages/wallet/src/mintbase-wallet.ts index 0f71d9bd..c32dcc60 100644 --- a/packages/wallet/src/mintbase-wallet.ts +++ b/packages/wallet/src/mintbase-wallet.ts @@ -4,8 +4,6 @@ import type { Action, BrowserWallet, FinalExecutionOutcome, - Optional, - Transaction, WalletBehaviourFactory, } from '@near-wallet-selector/core'; import { getCallbackUrl } from './utils'; @@ -42,10 +40,6 @@ export type CallBackArgs = { type: TransactionSuccessEnum; } -interface Networks { - mainnet: string; - testnet: string; -} export const MintbaseWallet: WalletBehaviourFactory< BrowserWallet, @@ -89,7 +83,7 @@ export const MintbaseWallet: WalletBehaviourFactory< }), ); } - + const nearConnection = await connect(connectionConfig); const wallet = new WalletConnection(nearConnection, 'mintbase-wallet'); localStorage.setItem('mintbase-wallet:callback_url', callback); @@ -158,7 +152,7 @@ export const MintbaseWallet: WalletBehaviourFactory< // transactions: await transformTransactions(transactions), // callbackUrl: cbUrl, // }); - + const { cbUrl } = getCallbackUrl(callbackUrl ?? ''); for (const { signerId } of transactions) { diff --git a/packages/wallet/src/utils.ts b/packages/wallet/src/utils.ts index 57e58ed1..e205d144 100644 --- a/packages/wallet/src/utils.ts +++ b/packages/wallet/src/utils.ts @@ -34,9 +34,7 @@ const checkCallbackUrl = (callbackUrl: string): string => { if (isValidURL(globalCallBackUrl)) { return globalCallBackUrl; } else { - console.error( - 'please set your callbackUrl property on setupMintbaseWallet - further help available on our telegram channel: https://t.me/mintdev', - ); + console.warn('We recommend you to set the callbackUrl property on setupMintbaseWallet \n read more here: \n https://docs.mintbase.xyz/dev/mintbase-sdk-ref/wallet#setupmintbasewallet \n \n further help available on our telegram channel: \n https://t.me/mintdev'); return new URL(window.location.href).toString(); } }