diff --git a/example/package-lock.json b/example/package-lock.json index aff1d12..890ae7b 100644 --- a/example/package-lock.json +++ b/example/package-lock.json @@ -20,11 +20,12 @@ } }, "..": { - "version": "2.1.0", + "version": "2.2.0", "license": "ISC", "dependencies": { - "@sats-connect/core": "0.0.4", - "@sats-connect/ui": "0.0.3" + "@sats-connect/core": "0.0.4-caef0cb", + "@sats-connect/make-default-provider-config": "0.0.1-38d3294", + "@sats-connect/ui": "0.0.3-07f4874" }, "devDependencies": { "husky": "^8.0.3", @@ -33,7 +34,7 @@ "rimraf": "^3.0.2", "ts-jest": "^29.0.5", "tsup": "^8.0.2", - "typescript": "^4.9.4" + "typescript": "5" } }, "node_modules/@aashutoshrathi/word-wrap": { diff --git a/package-lock.json b/package-lock.json index 74d0f35..7f015c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,9 @@ "version": "2.2.0", "license": "ISC", "dependencies": { - "@sats-connect/core": "0.0.4", - "@sats-connect/ui": "0.0.3" + "@sats-connect/core": "0.0.4-caef0cb", + "@sats-connect/make-default-provider-config": "0.0.1-38d3294", + "@sats-connect/ui": "0.0.3-07f4874" }, "devDependencies": { "husky": "^8.0.3", @@ -19,7 +20,7 @@ "rimraf": "^3.0.2", "ts-jest": "^29.0.5", "tsup": "^8.0.2", - "typescript": "^4.9.4" + "typescript": "5" } }, "node_modules/@ampproject/remapping": { @@ -1747,9 +1748,9 @@ ] }, "node_modules/@sats-connect/core": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@sats-connect/core/-/core-0.0.4.tgz", - "integrity": "sha512-v+u49OXku8S5Mh9wzQ6pSdNU4MppMjjUyXy/ZBE6KxqgP7Nnnz3N2VmaBSIGQx/EEy4O3L8SnJZyAwQ7QfOf7g==", + "version": "0.0.4-caef0cb", + "resolved": "https://registry.npmjs.org/@sats-connect/core/-/core-0.0.4-caef0cb.tgz", + "integrity": "sha512-M/yxUgnYF6JVhfLxMj0pLYZFiJfwkd7C3GYI43aVbaIVhqoSBianEEj2duIiSDAQLC03Scqbt2LXUu42dPs1fA==", "dependencies": { "axios": "1.6.8", "bitcoin-address-validation": "2.2.3", @@ -1758,14 +1759,39 @@ "lodash.omit": "4.5.0" } }, + "node_modules/@sats-connect/make-default-provider-config": { + "version": "0.0.1-38d3294", + "resolved": "https://registry.npmjs.org/@sats-connect/make-default-provider-config/-/make-default-provider-config-0.0.1-38d3294.tgz", + "integrity": "sha512-FpyaWUePBstUjXvBa8HfE1MFlU0kUh0eI1gR5ZpmP+HVFOmikgDGyjj8epcAGWO1yjVVxk4NLDoX70NDNFgnKA==", + "dependencies": { + "@sats-connect/core": "0.0.4-caef0cb", + "@sats-connect/ui": "0.0.3-07f4874", + "bowser": "2.11.0" + }, + "peerDependencies": { + "typescript": "5.4.4" + } + }, "node_modules/@sats-connect/ui": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@sats-connect/ui/-/ui-0.0.3.tgz", - "integrity": "sha512-IzK63qgwyrha/ngTHfwj4vwr518eYs45mrXQYamvridGX7VpbLksZlAl4McX/blq+t9DnnAK2apBk5ut441ovg==", + "version": "0.0.3-07f4874", + "resolved": "https://registry.npmjs.org/@sats-connect/ui/-/ui-0.0.3-07f4874.tgz", + "integrity": "sha512-H1rj4qOGr72M2pSFtgtFk9TjFHRhTt4vm2ct0iBJaLF4RLIa9EvPkFTMwBYhGBYNcuBpN36eYUBN7hRydfCopg==", "dependencies": { "@sats-connect/core": "0.0.4" } }, + "node_modules/@sats-connect/ui/node_modules/@sats-connect/core": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@sats-connect/core/-/core-0.0.4.tgz", + "integrity": "sha512-v+u49OXku8S5Mh9wzQ6pSdNU4MppMjjUyXy/ZBE6KxqgP7Nnnz3N2VmaBSIGQx/EEy4O3L8SnJZyAwQ7QfOf7g==", + "dependencies": { + "axios": "1.6.8", + "bitcoin-address-validation": "2.2.3", + "buffer": "6.0.3", + "jsontokens": "4.0.1", + "lodash.omit": "4.5.0" + } + }, "node_modules/@sinclair/typebox": { "version": "0.25.24", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.25.24.tgz", @@ -2161,6 +2187,11 @@ "sha256-uint8array": "^0.10.3" } }, + "node_modules/bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -5904,16 +5935,15 @@ } }, "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true, + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", + "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=4.2.0" + "node": ">=14.17" } }, "node_modules/update-browserslist-db": { @@ -7290,9 +7320,9 @@ "optional": true }, "@sats-connect/core": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@sats-connect/core/-/core-0.0.4.tgz", - "integrity": "sha512-v+u49OXku8S5Mh9wzQ6pSdNU4MppMjjUyXy/ZBE6KxqgP7Nnnz3N2VmaBSIGQx/EEy4O3L8SnJZyAwQ7QfOf7g==", + "version": "0.0.4-caef0cb", + "resolved": "https://registry.npmjs.org/@sats-connect/core/-/core-0.0.4-caef0cb.tgz", + "integrity": "sha512-M/yxUgnYF6JVhfLxMj0pLYZFiJfwkd7C3GYI43aVbaIVhqoSBianEEj2duIiSDAQLC03Scqbt2LXUu42dPs1fA==", "requires": { "axios": "1.6.8", "bitcoin-address-validation": "2.2.3", @@ -7301,12 +7331,36 @@ "lodash.omit": "4.5.0" } }, + "@sats-connect/make-default-provider-config": { + "version": "0.0.1-38d3294", + "resolved": "https://registry.npmjs.org/@sats-connect/make-default-provider-config/-/make-default-provider-config-0.0.1-38d3294.tgz", + "integrity": "sha512-FpyaWUePBstUjXvBa8HfE1MFlU0kUh0eI1gR5ZpmP+HVFOmikgDGyjj8epcAGWO1yjVVxk4NLDoX70NDNFgnKA==", + "requires": { + "@sats-connect/core": "0.0.4-caef0cb", + "@sats-connect/ui": "0.0.3-07f4874", + "bowser": "2.11.0" + } + }, "@sats-connect/ui": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/@sats-connect/ui/-/ui-0.0.3.tgz", - "integrity": "sha512-IzK63qgwyrha/ngTHfwj4vwr518eYs45mrXQYamvridGX7VpbLksZlAl4McX/blq+t9DnnAK2apBk5ut441ovg==", + "version": "0.0.3-07f4874", + "resolved": "https://registry.npmjs.org/@sats-connect/ui/-/ui-0.0.3-07f4874.tgz", + "integrity": "sha512-H1rj4qOGr72M2pSFtgtFk9TjFHRhTt4vm2ct0iBJaLF4RLIa9EvPkFTMwBYhGBYNcuBpN36eYUBN7hRydfCopg==", "requires": { "@sats-connect/core": "0.0.4" + }, + "dependencies": { + "@sats-connect/core": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/@sats-connect/core/-/core-0.0.4.tgz", + "integrity": "sha512-v+u49OXku8S5Mh9wzQ6pSdNU4MppMjjUyXy/ZBE6KxqgP7Nnnz3N2VmaBSIGQx/EEy4O3L8SnJZyAwQ7QfOf7g==", + "requires": { + "axios": "1.6.8", + "bitcoin-address-validation": "2.2.3", + "buffer": "6.0.3", + "jsontokens": "4.0.1", + "lodash.omit": "4.5.0" + } + } } }, "@sinclair/typebox": { @@ -7639,6 +7693,11 @@ "sha256-uint8array": "^0.10.3" } }, + "bowser": { + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.11.0.tgz", + "integrity": "sha512-AlcaJBi/pqqJBIQ8U9Mcpc9i8Aqxn88Skv5d+xBX006BY5u8N3mGLHa5Lgppa7L/HfwgwLgZ6NYs+Ag6uUmJRA==" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -10283,10 +10342,9 @@ "peer": true }, "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", - "dev": true + "version": "5.4.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.4.tgz", + "integrity": "sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==" }, "update-browserslist-db": { "version": "1.0.10", diff --git a/package.json b/package.json index 885c602..94ebc97 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,9 @@ ] }, "dependencies": { - "@sats-connect/core": "0.0.4", - "@sats-connect/ui": "0.0.3" + "@sats-connect/core": "0.0.4-caef0cb", + "@sats-connect/ui": "0.0.3-07f4874", + "@sats-connect/make-default-provider-config": "0.0.1-38d3294" }, "devDependencies": { "husky": "^8.0.3", @@ -32,7 +33,7 @@ "rimraf": "^3.0.2", "ts-jest": "^29.0.5", "tsup": "^8.0.2", - "typescript": "^4.9.4" + "typescript": "5" }, "repository": { "type": "git", diff --git a/src/index.ts b/src/index.ts index b2d8e86..c959cb3 100644 --- a/src/index.ts +++ b/src/index.ts @@ -11,7 +11,6 @@ import { removeDefaultProvider, RpcErrorCode, BaseAdapter, - createDefaultConfig, } from '@sats-connect/core'; import { Config, @@ -21,6 +20,7 @@ import { walletOpen, walletClose, } from '@sats-connect/ui'; +import { makeDefaultConfig } from '@sats-connect/make-default-provider-config'; loadSelector(); @@ -48,9 +48,11 @@ class Wallet { throw new Error('No wallets detected, may want to prompt user to install a wallet.'); } + console.log('[ARY]: providers', providers); + const selectorConfig = this.createCustomConfig ? this.createCustomConfig(providers) - : createDefaultConfig(providers); + : makeDefaultConfig(providers); const nextProviderId = await selectWalletProvider(selectorConfig); this.providerId = nextProviderId; }