diff --git a/.changeset/bright-pumpkins-speak.md b/.changeset/bright-pumpkins-speak.md new file mode 100644 index 00000000..73102fa5 --- /dev/null +++ b/.changeset/bright-pumpkins-speak.md @@ -0,0 +1,17 @@ +--- +'@stacks/connect-react': major +'@stacks/connect': major +--- + +Switch to new RPC API with SIP-030 + +BREAKING CHANGE: + +Adds the new `request` method to the `@stacks/connect` package. +Which is the default way of interacting with Bitcoin and Stacks wallets. +This update needs a slightly breaking change to the `showXyz` and `openXyz` methods. + +- ADDED `request` (UI) and `requestRaw` for calling wallet RPC methods +- UPDATED `SessionData` and `UserSession` to only expose a light `UserData` with `profile.stxAddress` +- UPDATED `StacksProvider` to only have a `request` method +- REMOVED `BlockstackProvider`, `StacksProvider` diff --git a/.changeset/lovely-jobs-fail.md b/.changeset/lovely-jobs-fail.md new file mode 100644 index 00000000..e84cd6d3 --- /dev/null +++ b/.changeset/lovely-jobs-fail.md @@ -0,0 +1,10 @@ +--- +'@stacks/connect-ui': major +--- + +Update UI properties + +BREAKING CHANGE: + +- RENAMED `persistSelection` to `persistWalletSelect` +- REMOVED `shouldUsePopup` from `@stacks/connect-ui` diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index e1c8a43a..0e89ae5f 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -67,11 +67,14 @@ jobs: - name: Get git commit id: git-commit run: echo "::set-output name=sha::$(git rev-parse --short HEAD)" - - name: print preid - env: - BRANCH: ${{ steps.git-branch.outputs.branch }} - SHA: ${{ steps.git-commit.outputs.sha }} - run: echo $BRANCH.$SHA + - name: Set preid + id: preid + run: | + if [ "${{ steps.git-branch.outputs.branch }}" = "beta" ]; then + echo "preid=beta" >> "$GITHUB_OUTPUT" + else + echo "preid=alpha.${{ steps.git-commit.outputs.sha }}" >> "$GITHUB_OUTPUT" + fi - name: Setup git run: | git config --local user.email "action@github.com" @@ -79,15 +82,15 @@ jobs: - name: Publish to NPM env: BRANCH: ${{ steps.git-branch.outputs.branch }} - SHA: ${{ steps.git-commit.outputs.sha }} - run: npx lerna publish prepatch --preid alpha.$SHA --dist-tag $BRANCH --yes --no-push - - name: Get alpha package versions - id: alpha + PREID: ${{ steps.preid.outputs.preid }} + run: npx lerna publish prepatch --preid $PREID --dist-tag $BRANCH --yes --no-push + - name: Get package versions + id: versions run: | echo "connect=$(cat packages/connect/package.json | jq -r '.version')" >> "$GITHUB_OUTPUT" echo "connectreact=$(cat packages/connect-react/package.json | jq -r '.version')" >> "$GITHUB_OUTPUT" echo "connectui=$(cat packages/connect-ui/package.json | jq -r '.version')" >> "$GITHUB_OUTPUT" - uses: janniks/pull-request-fixed-header@v1.0.1 with: - header: "> This PR was published to npm with the alpha versions:\n> - connect `npm install @stacks/connect@${{ steps.alpha.outputs.connect }} --save-exact`\n> - connect-react `npm install @stacks/connect-react@${{ steps.alpha.outputs.connectreact }} --save-exact`\n> - connect-ui `npm install @stacks/connect-ui@${{ steps.alpha.outputs.connectui }} --save-exact`" + header: "> This PR was published to npm with versions:\n> - connect `npm install @stacks/connect@${{ steps.versions.outputs.connect }} --save-exact`\n> - connect-react `npm install @stacks/connect-react@${{ steps.versions.outputs.connectreact }} --save-exact`\n> - connect-ui `npm install @stacks/connect-ui@${{ steps.versions.outputs.connectui }} --save-exact`" GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 91de42a4..48d1562d 100644 --- a/README.md +++ b/README.md @@ -20,25 +20,75 @@ This repository includes three packages: - [`@stacks/connect-react`](./packages/connect-react): A wrapper library for making `@stacks/connect` use in React even easier - [`@stacks/connect-ui`](./packages/connect-ui): A web-component UI for displaying an intro modal in Stacks web-apps during authentication _(used in the background by `@stacks/connect`)_. -## 🌎 More Information - -The [Stacks documentation website](https://docs.stacks.co/build-apps/overview) includes more examples for building apps using Connect. - -It also includes guides for various aspects of Stacks application development: - -- [Authentication](https://docs.stacks.co/build-apps/references/authentication) -- [Transactions](https://docs.stacks.co/understand-stacks/technical-specs#transactions) -- [Data storage](https://docs.stacks.co/build-apps/references/gaia#understand-data-storage) - -## 🐛 Bugs and feature requests - -If you encounter a bug or have a feature request, we encourage you to follow the steps below: - -1. **Search for existing issues:** Before submitting a new issue, please search [existing and closed issues](https://github.com/hirosystems/connect/issues) to check if a similar problem or feature request has already been reported. -1. **Open a new issue:** If it hasn't been addressed, please [open a new issue](https://github.com/hirosystems/connect/issues/new/choose). Choose the appropriate issue template and provide as much detail as possible, including steps to reproduce the bug or a clear description of the requested feature. -1. **Evaluation SLA:** Our team reads and evaluates all the issues and pull requests. We are avaliable Monday to Friday and we make a best effort to respond within 7 business days. - -Please **do not** use the issue tracker for personal support requests or to ask for the status of a transaction. You'll find help at the [#stacks-js Discord channel](https://stacks.chat/). +## 🛠️ Wallet Implementation Guide + +Wallets implement a "Provider" interface. +The latest spec uses a simple JS Object exposing a `.request(method: string, params?: object)` method. + +Pseudo-code: + +```ts +window.MyProvider = { + async request(method, params) { + // Somehow communicate with the wallet (e.g. via events) + + // Recommendation: Create a JSON RPC 2.0 request object + // https://www.jsonrpc.org/specification + + return Promise.resolve({ + // Respond with a JSON RPC 2.0 response object + id: crypto.randomUUID(), // required, same as request + jsonrpc: '2.0', // required + + // `.result` is required on success + result: { + // object matching specified RPC methods + }, + + // `.error` is required on error + error: { + // Use existing codes from https://www.jsonrpc.org/specification#error_object + code: number, // required, integer + message: string, // recommended, single sentence + data: object, // optional + }, + }); + }, + isMyWallet: true, // optional, a way of identifying the wallet for developers +}; + +window.wbip_providers = window.wbip_providers || []; +window.wbip_providers.push({ + // `WbipProvider` type + /** The global "path" of the provider (e.g. `"MyProvider"` if registered at `window.MyProvider`) */ + id: 'MyProvider', + /** The name of the provider, as displayed to the user */ + name: 'My Wallet'; + /** The data URL of an image to show (e.g. `data:image/png;base64,iVBORw0...`) @see https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URLs */ + icon?: 'data:image/png;base64,iVBORw0...'; + /** Web URL of the provider */ + webUrl?: 'https://mywallet.example.com'; + + // Addional URLs + chromeWebStoreUrl?: string; + mozillaAddOnsUrl?: string; + googlePlayStoreUrl?: string; + iOSAppStoreUrl?: string; +}); +``` + +### JSON RPC 2.0 + +Wallets may add their own unstandardized methods. +However, the minimum recommended methods are: + +- `getAddresses` [WBIP](https://wbips.netlify.app/request_api/getAddresses) +- `signPsbt` [WBIP](https://wbips.netlify.app/request_api/signPsbt) +- `stx_getAddresses` [SIP-030](https://github.com/janniks/sips/blob/main/sips/sip-030/sip-030-wallet-interface.md) +- `stx_transferStx` [SIP-030](https://github.com/janniks/sips/blob/main/sips/sip-030/sip-030-wallet-interface.md) +- `stx_callContract` [SIP-030](https://github.com/janniks/sips/blob/main/sips/sip-030/sip-030-wallet-interface.md) +- `stx_signMessage` [SIP-030](https://github.com/janniks/sips/blob/main/sips/sip-030/sip-030-wallet-interface.md) +- `stx_signStructuredMessage` [SIP-030](https://github.com/janniks/sips/blob/main/sips/sip-030/sip-030-wallet-interface.md) ## 🎁 Contribute @@ -59,3 +109,14 @@ Join our community and stay connected with the latest updates and discussions: - [Join our Discord community chat](https://stacks.chat/) to engage with other users, ask questions, and participate in discussions. - [Visit hiro.so](https://www.hiro.so/) for updates and subcribing to the mailing list. - Follow [Hiro on Twitter.](https://twitter.com/hirosystems) + +### MIGRATION TODO + +#### TODO + +- Add `PostConditionModeName` to all options (new and old) — This might have been missing since the v7 release. +- Strip unserializable fields from RawLegacy wrapper just in case. +- Remove exports from LEGACY_XYZ +- Make hex to base64 for psbt + +Search for the below and replace with inline return. diff --git a/package-lock.json b/package-lock.json index 837055d7..449bfb02 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,9 @@ "workspaces": [ "packages/**" ], + "dependencies": { + "type-fest": "^4.34.1" + }, "devDependencies": { "@babel/preset-typescript": "^7.26.0", "@changesets/changelog-github": "^0.5.0", @@ -27,7 +30,7 @@ "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-unused-imports": "^3.2.0", "husky": "^9.1.6", - "lerna": "8.1.8", + "lerna": "8.1.9", "prettier": "^3.3.3", "prettier-plugin-tailwindcss": "^0.6.8", "react": "^18.3.1", @@ -3345,16 +3348,16 @@ } }, "node_modules/@lerna/create": { - "version": "8.1.8", - "resolved": "https://registry.npmjs.org/@lerna/create/-/create-8.1.8.tgz", - "integrity": "sha512-wi72R01tgjBjzG2kjRyTHl4yCTKDfDMIXRyKz9E/FBa9SkFvUOAE4bdyY9MhEsRZmSWL7+CYE8Flv/HScRpBbA==", + "version": "8.1.9", + "resolved": "https://registry.npmjs.org/@lerna/create/-/create-8.1.9.tgz", + "integrity": "sha512-DPnl5lPX4v49eVxEbJnAizrpMdMTBz1qykZrAbBul9rfgk531v8oAt+Pm6O/rpAleRombNM7FJb5rYGzBJatOQ==", "dev": true, "license": "MIT", "dependencies": { "@npmcli/arborist": "7.5.4", "@npmcli/package-json": "5.2.0", "@npmcli/run-script": "8.1.0", - "@nx/devkit": ">=17.1.2 < 20", + "@nx/devkit": ">=17.1.2 < 21", "@octokit/plugin-enterprise-rest": "6.0.1", "@octokit/rest": "19.0.11", "aproba": "2.0.0", @@ -3367,7 +3370,7 @@ "console-control-strings": "^1.1.0", "conventional-changelog-core": "5.0.1", "conventional-recommended-bump": "7.0.1", - "cosmiconfig": "^8.2.0", + "cosmiconfig": "9.0.0", "dedent": "1.5.3", "execa": "5.0.0", "fs-extra": "^11.2.0", @@ -3393,7 +3396,7 @@ "npm-package-arg": "11.0.2", "npm-packlist": "8.0.2", "npm-registry-fetch": "^17.1.0", - "nx": ">=17.1.2 < 20", + "nx": ">=17.1.2 < 21", "p-map": "4.0.0", "p-map-series": "2.1.0", "p-queue": "6.6.2", @@ -3498,37 +3501,10 @@ "dev": true, "license": "MIT" }, - "node_modules/@lerna/create/node_modules/cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", - "dev": true, - "license": "MIT", - "dependencies": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "node_modules/@lerna/create/node_modules/fs-extra": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", - "integrity": "sha512-PmDi3uwK5nFuXh7XDTlVnS17xJS7vW36is2+w3xcv8SVxiB4NyATf4ctkVY5bkSjX0Y4nbvZCq1/EjtEyr9ktw==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.3.0.tgz", + "integrity": "sha512-Z4XaCL6dUDHfP/jT25jJKMmtxvuwbkrD1vNSMFlo9lNLY2c5FHYSQgHPRZUjAB26TpDEoW9HCOgplrdbaPV/ew==", "dev": true, "license": "MIT", "dependencies": { @@ -4301,38 +4277,13 @@ "node": "^16.13.0 || >=18.0.0" } }, - "node_modules/@nrwl/devkit": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nrwl/devkit/-/devkit-19.8.6.tgz", - "integrity": "sha512-F6+4Lv2hSS+02H7aqa+jYIHzbmip7082DF9/NkNtUAEqLUi8STsbung0nchaR1Tjg20E+BZujEsZgTC3GJegLQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "@nx/devkit": "19.8.6" - } - }, - "node_modules/@nrwl/tao": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nrwl/tao/-/tao-19.8.6.tgz", - "integrity": "sha512-ibxGL7aDpNARgPegXQ8HAocemZ1WvZE5+NHkXDs7jSmnSt9qaXIKE1dXotDTqp3TqCirlje1/RMMTqzCl2oExQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "nx": "19.8.6", - "tslib": "^2.3.0" - }, - "bin": { - "tao": "index.js" - } - }, "node_modules/@nx/devkit": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-19.8.6.tgz", - "integrity": "sha512-8NAdnqwzki3srj2sAImWQ9cQiq79NqwqVqx/XOdg0XHR6siugn+sAAXWpM3xJVdv4uRbcyz7BO1GWYxMW0AOYA==", + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@nx/devkit/-/devkit-20.4.2.tgz", + "integrity": "sha512-JD/7E/e49P7V9ESQK8b7uEzxgp1TP9Op163QmsJ6In0fpv3RytZSmAUx7lBdwOuOS6yybz8UWSLC/tyADUfDcg==", "dev": true, "license": "MIT", "dependencies": { - "@nrwl/devkit": "19.8.6", "ejs": "^3.1.7", "enquirer": "~2.3.6", "ignore": "^5.0.4", @@ -4370,9 +4321,9 @@ } }, "node_modules/@nx/nx-darwin-arm64": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-19.8.6.tgz", - "integrity": "sha512-lzFV07gUgvy07lPtRFJFhlQdcR0qNTPPq7/ZB+3alwUIDdAn706ZVzf6apCJWOBIgNFKbAQiy/du0zmuKPSzXA==", + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-arm64/-/nx-darwin-arm64-20.4.2.tgz", + "integrity": "sha512-djXV3rZcDdps2TUo7bMNiB6IkxFlLIZfub5cxPhxSbnrKiMGqmISZNn9n0AmchpNNL6auRWZPAPtDfowtR5GqA==", "cpu": [ "arm64" ], @@ -4387,9 +4338,9 @@ } }, "node_modules/@nx/nx-darwin-x64": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-19.8.6.tgz", - "integrity": "sha512-1ZmOXwJva14jCcTHM8jmsEBp33CCLng/tXK8/554ACwL3Kk4kbtdLfUjM/VEMZ3v3c1D7cJWxyYfTav5meumxg==", + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-darwin-x64/-/nx-darwin-x64-20.4.2.tgz", + "integrity": "sha512-3PsiO4zEGgco/pSkYnHIB2j/IEnxsaoME+WdRYa8nRfewASAqCqf7e8DyOCftR7CBsXRosiUQWDcICu3cIfBgw==", "cpu": [ "x64" ], @@ -4404,9 +4355,9 @@ } }, "node_modules/@nx/nx-freebsd-x64": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-19.8.6.tgz", - "integrity": "sha512-1a681ZqSS05H1pC6JG3ae0BLhnxGtISkCigl9R6W5NeyFLBgP+Y4BLh+H9cCAlKzzLwiKWWRmhbxvjpnlhzB+w==", + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-freebsd-x64/-/nx-freebsd-x64-20.4.2.tgz", + "integrity": "sha512-FXaQqn67KDGF6b735GCjFVyWVFWYrVxftvmaM/V4pCmJXjhO3K9NV3jhPVj2MNmrpdYwUtfTP1JMpr/iUBYCQA==", "cpu": [ "x64" ], @@ -4421,9 +4372,9 @@ } }, "node_modules/@nx/nx-linux-arm-gnueabihf": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-19.8.6.tgz", - "integrity": "sha512-qGztEgbEjMsFr9IjedQXJNmXLHCpSldW/sEtXoVZ8tXIzGr86GXbv+mLdZSZHrlJaNOq0y2K6XpVd2UH4ndwnQ==", + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm-gnueabihf/-/nx-linux-arm-gnueabihf-20.4.2.tgz", + "integrity": "sha512-RcVr6VN7lWJybr0bjs2zaK9mQ0OMFmuILx/8IDniLjAQK8JB+1qQhHLgunAAUJtWv+o0sVb6WXlN/F7PTegmEA==", "cpu": [ "arm" ], @@ -4438,9 +4389,9 @@ } }, "node_modules/@nx/nx-linux-arm64-gnu": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-19.8.6.tgz", - "integrity": "sha512-rSwsEISx5odXkg1kjXBZ6kjXCnM3fnAA+8YU1muRr7PmhUfM/zuCnNYcwmjtCRc7rRYBKzxmyE3T95fGK/NOIg==", + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-gnu/-/nx-linux-arm64-gnu-20.4.2.tgz", + "integrity": "sha512-Gt38hdU615g+pUAUHe5Z9ingLgpDKNumbJfqe6Y65N9XDHMGvi3YpUwFio2t/8DNZDYY7FH46CBYydDCJjDNyw==", "cpu": [ "arm64" ], @@ -4455,9 +4406,9 @@ } }, "node_modules/@nx/nx-linux-arm64-musl": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-19.8.6.tgz", - "integrity": "sha512-7rW21+uFj5KJx3z/HXhl6PUcp8+mQ8r/nUGbS59HjmMdVMZDd7PZKUVJF9Tu1ESproOCYSeJbOVk4WGiHtbF9Q==", + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-arm64-musl/-/nx-linux-arm64-musl-20.4.2.tgz", + "integrity": "sha512-Kp658KNoRfhi4a/1eoXrxxBiw2kkXqR745iuytVn1f/BL3L2tUHCp6+OyFF7sLx8TnlU9yZAxO62k4DPqS+Ffw==", "cpu": [ "arm64" ], @@ -4472,9 +4423,9 @@ } }, "node_modules/@nx/nx-linux-x64-gnu": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-19.8.6.tgz", - "integrity": "sha512-2/5WDr2wwWyvbqlB//ICWS5q3rRF4GyNX2NOp/tVkmh1RfDhH0ZAVZ/oJ7QvE1mKLQh0AM7bQBHsF5ikmMhUXw==", + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-gnu/-/nx-linux-x64-gnu-20.4.2.tgz", + "integrity": "sha512-v+qOF2tmFFPX3fYYCqcdLIgATqlaQcBSHDs8EbwZjdncWk6RQAI/hq6+06+oZQc71RnyhBq5zBE12P0Bj1qTbw==", "cpu": [ "x64" ], @@ -4489,9 +4440,9 @@ } }, "node_modules/@nx/nx-linux-x64-musl": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-19.8.6.tgz", - "integrity": "sha512-G3UIMk+C090WR/btOaJCrBgRa7gjTj6ZBHinFceO7rii8r3D1SiN5cW1Njd1pV2K7IjJaSTuRtd9c1eLcIj9rQ==", + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-linux-x64-musl/-/nx-linux-x64-musl-20.4.2.tgz", + "integrity": "sha512-MxlAqNItkSyiVcB91pOpYWX2Mj6PL9+GzPa63TA0v4PcpZTsFmToYlbKno/1e2T6AKI/0R1ZkAo1XxurUc++nw==", "cpu": [ "x64" ], @@ -4506,9 +4457,9 @@ } }, "node_modules/@nx/nx-win32-arm64-msvc": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-19.8.6.tgz", - "integrity": "sha512-8dfUstJkN2ChbIcj3TfcHgWyJy0b9za+3gU9IvZm82P9EeDCjEGoE/ld9VALGa+2UnX2Ve5BqlWGTD8BqYTeCA==", + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-arm64-msvc/-/nx-win32-arm64-msvc-20.4.2.tgz", + "integrity": "sha512-0FkvctI4lXFK0BEhQjM5If9RC0ja16oVjSacyLY893gBhbSI56Ud/XSA75uF6aplA4AvBe97NPQg5l5btJSxYw==", "cpu": [ "arm64" ], @@ -4523,9 +4474,9 @@ } }, "node_modules/@nx/nx-win32-x64-msvc": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-19.8.6.tgz", - "integrity": "sha512-kbWDZGD9kwP60UykTnfMR1hOUMDK0evXb5EnF4MAf4o18+b5KSzHyaL2TyNl+3s6lYdtZ2kYC679R+eJErKG8w==", + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@nx/nx-win32-x64-msvc/-/nx-win32-x64-msvc-20.4.2.tgz", + "integrity": "sha512-J7Nh/3hfdlbEXvvIYJI+tAnvupYaeDwSU8ZRlDV7VU5Ee9VLT3hDLhmtXcDjEZnFHNPyaIYgFZXXDppU3a04Xg==", "cpu": [ "x64" ], @@ -5009,26 +4960,10 @@ "dev": true, "license": "MIT" }, - "node_modules/@scure/bip39": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@scure/bip39/-/bip39-1.1.0.tgz", - "integrity": "sha512-pwrPOS16VeTKg98dYXQyIjJEcWfz7/1YJIwxUEPFfQPtc86Ym/1sVgQ2RLoD43AazMk2l/unK4ITySSpW2+82w==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ], - "license": "MIT", - "dependencies": { - "@noble/hashes": "~1.1.1", - "@scure/base": "~1.1.0" - } - }, - "node_modules/@scure/bip39/node_modules/@scure/base": { - "version": "1.1.9", - "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", - "integrity": "sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==", + "node_modules/@scure/base": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.2.4.tgz", + "integrity": "sha512-5Yy9czTO47mqz+/J8GM6GIId4umdCk1wc1q8rKERQulIoc8VP9pzDcghv10Tl2E7R96ZUx/PhND3ESYUQX8NuQ==", "license": "MIT", "funding": { "url": "https://paulmillr.com/funding/" @@ -5114,13 +5049,13 @@ } }, "node_modules/@sigstore/protobuf-specs": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.3.2.tgz", - "integrity": "sha512-c6B0ehIWxMI8wiS/bj6rHMPqeFvngFV7cDU/MY+B16P9Z3Mp9k8L93eYZ7BYzSickzuqAQqAq0V956b3Ju6mLw==", + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@sigstore/protobuf-specs/-/protobuf-specs-0.3.3.tgz", + "integrity": "sha512-RpacQhBlwpBWd7KEJsRKcBQalbV28fvkxwTOJIqhIuDysMMaJW47V4OqW30iJB9uRpqOSxxEAQFdr8tTattReQ==", "dev": true, "license": "Apache-2.0", "engines": { - "node": "^16.14.0 || >=18.0.0" + "node": "^18.17.0 || >=20.5.0" } }, "node_modules/@sigstore/sign": { @@ -5177,21 +5112,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@stacks/auth": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@stacks/auth/-/auth-7.0.4.tgz", - "integrity": "sha512-e875v255+9mKv3v5tQIRBcyvnFXvdYcAX4y/7HcVjPAVKe8IPR938zURTmMlY3yehtXMyG1G5LFizi7qERsP7A==", - "license": "MIT", - "dependencies": { - "@noble/secp256k1": "1.7.1", - "@stacks/common": "^7.0.2", - "@stacks/encryption": "^7.0.4", - "@stacks/network": "^7.0.2", - "@stacks/profile": "^7.0.4", - "cross-fetch": "^3.1.5", - "jsontokens": "^4.0.1" - } - }, "node_modules/@stacks/common": { "version": "7.0.2", "resolved": "https://registry.npmjs.org/@stacks/common/-/common-7.0.2.tgz", @@ -5210,22 +5130,6 @@ "resolved": "packages/connect-ui", "link": true }, - "node_modules/@stacks/encryption": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/@stacks/encryption/-/encryption-7.0.4.tgz", - "integrity": "sha512-MIoRURjfIWN/1WpUGthY1jz7gCN/A76VV6G04MGw7Haiy1jW3Vhprf0kkoYKcQSu+NPyE9PWhaKjRXN4ZS/SwA==", - "license": "MIT", - "dependencies": { - "@noble/hashes": "1.1.5", - "@noble/secp256k1": "1.7.1", - "@scure/bip39": "1.1.0", - "@stacks/common": "^7.0.2", - "base64-js": "^1.5.1", - "bs58": "^5.0.0", - "ripemd160-min": "^0.0.6", - "varuint-bitcoin": "^1.1.2" - } - }, "node_modules/@stacks/eslint-config": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@stacks/eslint-config/-/eslint-config-2.0.0.tgz", @@ -7934,9 +7838,9 @@ "license": "BSD-2-Clause" }, "node_modules/@yarnpkg/parsers": { - "version": "3.0.0-rc.46", - "resolved": "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.0-rc.46.tgz", - "integrity": "sha512-aiATs7pSutzda/rq8fnuPwTglyVwjM22bNnK2ZgjrpAjQHSSl3lztd2f9evst1W/qnC58DRz7T7QndUDumAR4Q==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@yarnpkg/parsers/-/parsers-3.0.2.tgz", + "integrity": "sha512-/HcYgtUSiJiot/XWGLOlGxPYUG65+/31V8oqk17vZLW1xlCoR4PampyePljOxY2n8/3jz9+tIFzICsyGujJZoA==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -7944,7 +7848,7 @@ "tslib": "^2.4.0" }, "engines": { - "node": ">=14.15.0" + "node": ">=18.12.0" } }, "node_modules/@zkochan/js-yaml": { @@ -8814,15 +8718,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/bs58": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bs58/-/bs58-5.0.0.tgz", - "integrity": "sha512-r+ihvQJvahgYT50JD05dyJNKlmmSlMoOGwn1lCcEzanPglg7TxYjioQUYehQ9mAR/+hOSd2jRc/Z2y5UxBymvQ==", - "license": "MIT", - "dependencies": { - "base-x": "^4.0.0" - } - }, "node_modules/buffer": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", @@ -11790,13 +11685,13 @@ } }, "node_modules/dotenv-expand": { - "version": "11.0.6", - "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.6.tgz", - "integrity": "sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g==", + "version": "11.0.7", + "resolved": "https://registry.npmjs.org/dotenv-expand/-/dotenv-expand-11.0.7.tgz", + "integrity": "sha512-zIHwmZPRshsCdpMDyVsqGmgyP0yT8GAgXUnkdAoJisxvf33k7yO6OuoKmcTGuXPWSsm8Oh88nZicRLA9Y0rUeA==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "dotenv": "^16.4.4" + "dotenv": "^16.4.5" }, "engines": { "node": ">=12" @@ -11806,9 +11701,9 @@ } }, "node_modules/dotenv-expand/node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -13122,9 +13017,9 @@ } }, "node_modules/exponential-backoff": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.1.tgz", - "integrity": "sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/exponential-backoff/-/exponential-backoff-3.1.2.tgz", + "integrity": "sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==", "dev": true, "license": "Apache-2.0" }, @@ -14598,6 +14493,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globalthis": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", @@ -16620,17 +16528,17 @@ } }, "node_modules/lerna": { - "version": "8.1.8", - "resolved": "https://registry.npmjs.org/lerna/-/lerna-8.1.8.tgz", - "integrity": "sha512-Rmo5ShMx73xM2CUcRixjmpZIXB7ZFlWEul1YvJyx/rH4onAwDHtUGD7Rx4NZYL8QSRiQHroglM2Oyq+WqA4BYg==", + "version": "8.1.9", + "resolved": "https://registry.npmjs.org/lerna/-/lerna-8.1.9.tgz", + "integrity": "sha512-ZRFlRUBB2obm+GkbTR7EbgTMuAdni6iwtTQTMy7LIrQ4UInG44LyfRepljtgUxh4HA0ltzsvWfPkd5J1DKGCeQ==", "dev": true, "license": "MIT", "dependencies": { - "@lerna/create": "8.1.8", + "@lerna/create": "8.1.9", "@npmcli/arborist": "7.5.4", "@npmcli/package-json": "5.2.0", "@npmcli/run-script": "8.1.0", - "@nx/devkit": ">=17.1.2 < 20", + "@nx/devkit": ">=17.1.2 < 21", "@octokit/plugin-enterprise-rest": "6.0.1", "@octokit/rest": "19.0.11", "aproba": "2.0.0", @@ -16644,7 +16552,7 @@ "conventional-changelog-angular": "7.0.0", "conventional-changelog-core": "5.0.1", "conventional-recommended-bump": "7.0.1", - "cosmiconfig": "^8.2.0", + "cosmiconfig": "9.0.0", "dedent": "1.5.3", "envinfo": "7.13.0", "execa": "5.0.0", @@ -16675,7 +16583,7 @@ "npm-package-arg": "11.0.2", "npm-packlist": "8.0.2", "npm-registry-fetch": "^17.1.0", - "nx": ">=17.1.2 < 20", + "nx": ">=17.1.2 < 21", "p-map": "4.0.0", "p-map-series": "2.1.0", "p-pipe": "3.1.0", @@ -16786,33 +16694,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lerna/node_modules/cosmiconfig": { - "version": "8.3.6", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", - "integrity": "sha512-kcZ6+W5QzcJ3P1Mt+83OUv/oHFqZHIx8DuxG6eZ5RGMERoLqp4BuGjhHLYGK+Kf5XVkQvqBSmAy/nGWN3qDgEA==", - "dev": true, - "license": "MIT", - "dependencies": { - "import-fresh": "^3.3.0", - "js-yaml": "^4.1.0", - "parse-json": "^5.2.0", - "path-type": "^4.0.0" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/d-fischer" - }, - "peerDependencies": { - "typescript": ">=4.9.5" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, "node_modules/lerna/node_modules/fs-extra": { "version": "11.2.0", "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-11.2.0.tgz", @@ -17066,9 +16947,9 @@ } }, "node_modules/libnpmpublish/node_modules/ci-info": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", - "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.1.0.tgz", + "integrity": "sha512-HutrvTNsF48wnxkzERIXOe5/mlcfFcbfCmwcg6CJnizbSue78AbDt+1cgl26zwn61WFxhcPykPfZrbqjGmBb4A==", "dev": true, "funding": [ { @@ -18257,9 +18138,9 @@ } }, "node_modules/node-gyp": { - "version": "10.2.0", - "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.2.0.tgz", - "integrity": "sha512-sp3FonBAaFe4aYTcFdZUn2NYkbP7xroPGYvQmP4Nl5PxamznItBnNCgjrVTKrEfQynInMsJvZrdmqUnysCJ8rw==", + "version": "10.3.1", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-10.3.1.tgz", + "integrity": "sha512-Pp3nFHBThHzVtNY7U6JfPjvT/DTE8+o/4xKsLQtBoU+j2HLsGlhcfzflAoUreaJbNmYnX+LlLi0qjV8kpyO6xQ==", "dev": true, "license": "MIT", "dependencies": { @@ -18544,17 +18425,16 @@ } }, "node_modules/nx": { - "version": "19.8.6", - "resolved": "https://registry.npmjs.org/nx/-/nx-19.8.6.tgz", - "integrity": "sha512-VkEbXoCil4UnSDOJP5OcIKZgI13hKsFlQNf6oKhUHCYWoEHvVqpvabMv/ZY9mGG78skvqAorzn85BS3evlt0Cw==", + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/nx/-/nx-20.4.2.tgz", + "integrity": "sha512-WXbKqk8looDo9zAISfmWtGyGm5RlOvr0G/THAa1WGSU4qHAZDsUtMAtwnxXje9s+R5rrwMmhbXCVvZELyeJP9Q==", "dev": true, "hasInstallScript": true, "license": "MIT", "dependencies": { "@napi-rs/wasm-runtime": "0.2.4", - "@nrwl/tao": "19.8.6", "@yarnpkg/lockfile": "^1.1.0", - "@yarnpkg/parsers": "3.0.0-rc.46", + "@yarnpkg/parsers": "3.0.2", "@zkochan/js-yaml": "0.0.7", "axios": "^1.7.4", "chalk": "^4.1.0", @@ -18576,13 +18456,14 @@ "npm-run-path": "^4.0.1", "open": "^8.4.0", "ora": "5.3.0", + "resolve.exports": "2.0.3", "semver": "^7.5.3", "string-width": "^4.2.3", - "strong-log-transformer": "^2.1.0", "tar-stream": "~2.2.0", "tmp": "~0.2.1", "tsconfig-paths": "^4.1.2", "tslib": "^2.3.0", + "yaml": "^2.6.0", "yargs": "^17.6.2", "yargs-parser": "21.1.1" }, @@ -18591,16 +18472,16 @@ "nx-cloud": "bin/nx-cloud.js" }, "optionalDependencies": { - "@nx/nx-darwin-arm64": "19.8.6", - "@nx/nx-darwin-x64": "19.8.6", - "@nx/nx-freebsd-x64": "19.8.6", - "@nx/nx-linux-arm-gnueabihf": "19.8.6", - "@nx/nx-linux-arm64-gnu": "19.8.6", - "@nx/nx-linux-arm64-musl": "19.8.6", - "@nx/nx-linux-x64-gnu": "19.8.6", - "@nx/nx-linux-x64-musl": "19.8.6", - "@nx/nx-win32-arm64-msvc": "19.8.6", - "@nx/nx-win32-x64-msvc": "19.8.6" + "@nx/nx-darwin-arm64": "20.4.2", + "@nx/nx-darwin-x64": "20.4.2", + "@nx/nx-freebsd-x64": "20.4.2", + "@nx/nx-linux-arm-gnueabihf": "20.4.2", + "@nx/nx-linux-arm64-gnu": "20.4.2", + "@nx/nx-linux-arm64-musl": "20.4.2", + "@nx/nx-linux-x64-gnu": "20.4.2", + "@nx/nx-linux-x64-musl": "20.4.2", + "@nx/nx-win32-arm64-msvc": "20.4.2", + "@nx/nx-win32-x64-msvc": "20.4.2" }, "peerDependencies": { "@swc-node/register": "^1.8.0", @@ -18669,9 +18550,9 @@ "license": "MIT" }, "node_modules/nx/node_modules/dotenv": { - "version": "16.4.5", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.5.tgz", - "integrity": "sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==", + "version": "16.4.7", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.4.7.tgz", + "integrity": "sha512-47qPchRCykZC03FhkYAhrvwU4xDBFIj1QPqaarj6mdM/hgUzfPHcpkHJOn3mJAufFeeAxAzeGsr5X0M4k6fLZQ==", "dev": true, "license": "BSD-2-Clause", "engines": { @@ -21719,6 +21600,16 @@ "url": "https://github.com/privatenumber/resolve-pkg-maps?sponsor=1" } }, + "node_modules/resolve.exports": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.3.tgz", + "integrity": "sha512-OcXjMsGdhL4XnbShKpAcSqPMzQoYkYyhbEaeSko47MjRP9NfEQMhZkXL1DoFlt9LWQn4YttrdnV6X2OiyzBi+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, "node_modules/restore-cursor": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", @@ -21817,14 +21708,6 @@ "node": "*" } }, - "node_modules/ripemd160-min": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/ripemd160-min/-/ripemd160-min-0.0.6.tgz", - "integrity": "sha512-+GcJgQivhs6S9qvLogusiTcS9kQUfgR75whKuy5jIhuiOfQuJ8fjqxV6EGD5duH1Y/FawFUMtMhyeq3Fbnib8A==", - "engines": { - "node": ">=8" - } - }, "node_modules/rollup": { "version": "4.24.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", @@ -21935,6 +21818,7 @@ "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, "funding": [ { "type": "github", @@ -22488,9 +22372,9 @@ } }, "node_modules/spdx-license-ids": { - "version": "3.0.20", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.20.tgz", - "integrity": "sha512-jg25NiDV/1fLtSgEgyvVyDunvaNHbuwF9lfNV17gSmPFAlYzdfNBlLtLzXTevwkPj7DhGbmN9VnmJIgLnhvaBw==", + "version": "3.0.21", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.21.tgz", + "integrity": "sha512-Bvg/8F5XephndSK3JffaRqdT+gyhfqIPwDHpX80tJrF8QQRYMo8sNMeaZ2Dp5+jhwKnUmIOyFFQfHRkjJm5nXg==", "dev": true, "license": "CC0-1.0" }, @@ -24011,13 +23895,12 @@ } }, "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, + "version": "4.34.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-4.34.1.tgz", + "integrity": "sha512-6kSc32kT0rbwxD6QL1CYe8IqdzN/J/ILMrNK+HMQCKH3insCDRY/3ITb0vcBss0a3t72fzh2YSzj8ko1HgwT3g==", "license": "(MIT OR CC0-1.0)", "engines": { - "node": ">=10" + "node": ">=16" }, "funding": { "url": "https://github.com/sponsors/sindresorhus" @@ -24517,15 +24400,6 @@ "node": "^14.17.0 || ^16.13.0 || >=18.0.0" } }, - "node_modules/varuint-bitcoin": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/varuint-bitcoin/-/varuint-bitcoin-1.1.2.tgz", - "integrity": "sha512-4EVb+w4rx+YfVM32HQX42AbbT7/1f5zwAYhIujKXKk8NQK+JfRVl3pqT3hjNn/L+RstigmGGKVwHA/P0wgITZw==", - "license": "MIT", - "dependencies": { - "safe-buffer": "^5.1.1" - } - }, "node_modules/vfile": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/vfile/-/vfile-6.0.3.tgz", @@ -26526,18 +26400,17 @@ }, "packages/connect": { "name": "@stacks/connect", - "version": "7.10.0", + "version": "7.10.1", "license": "MIT", "dependencies": { - "@stacks/auth": "^7.0.0", + "@scure/base": "^1.2.4", "@stacks/common": "^7.0.0", "@stacks/connect-ui": "6.6.0", "@stacks/network": "^7.0.0", "@stacks/network-v6": "npm:@stacks/network@^6.16.0", "@stacks/profile": "^7.0.0", "@stacks/transactions": "^7.0.0", - "@stacks/transactions-v6": "npm:@stacks/transactions@^6.16.0", - "jsontokens": "^4.0.1" + "@stacks/transactions-v6": "npm:@stacks/transactions@^6.16.0" }, "devDependencies": { "@babel/preset-env": "^7.23.3", @@ -26565,11 +26438,10 @@ }, "packages/connect-react": { "name": "@stacks/connect-react", - "version": "22.6.1", + "version": "22.6.2", "license": "MIT", "dependencies": { - "@stacks/connect": "7.10.0", - "jsontokens": "^4.0.1" + "@stacks/connect": "7.10.1" }, "devDependencies": { "@types/react-dom": "^18.3.1", diff --git a/package.json b/package.json index b8a52a2a..6876ea3d 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "eslint-plugin-react-hooks": "^4.6.2", "eslint-plugin-unused-imports": "^3.2.0", "husky": "^9.1.6", - "lerna": "8.1.8", + "lerna": "8.1.9", "prettier": "^3.3.3", "prettier-plugin-tailwindcss": "^0.6.8", "react": "^18.3.1", @@ -48,5 +48,8 @@ "typedoc": "^0.26.10", "typescript": "^5.3.2", "vitest": "^2.1.8" + }, + "dependencies": { + "type-fest": "^4.34.1" } } diff --git a/packages/connect-react/package.json b/packages/connect-react/package.json index b302cb7a..71d7149e 100644 --- a/packages/connect-react/package.json +++ b/packages/connect-react/package.json @@ -9,8 +9,7 @@ "types": "tsc --project tsconfig.json --emitDeclarationOnly" }, "dependencies": { - "@stacks/connect": "7.10.1", - "jsontokens": "^4.0.1" + "@stacks/connect": "7.10.1" }, "devDependencies": { "@types/react-dom": "^18.3.1", diff --git a/packages/connect-react/src/react/hooks/use-connect.ts b/packages/connect-react/src/react/hooks/use-connect.ts index 5affc415..76c9d471 100644 --- a/packages/connect-react/src/react/hooks/use-connect.ts +++ b/packages/connect-react/src/react/hooks/use-connect.ts @@ -10,23 +10,23 @@ import { FinishedAuthData, openContractCall, openContractDeploy, - openSignTransaction, openProfileUpdateRequestPopup, openPsbtRequestPopup, openSignatureRequestPopup, + openSignTransaction, openStructuredDataSignatureRequestPopup, openSTXTransfer, - PsbtRequestOptions, ProfileUpdateRequestOptions, + PsbtRequestOptions, showBlockstackConnect, SignatureRequestOptions, + SignTransactionOptions, + StacksProvider, + StructuredDataSignatureRequestOptions, STXTransferOptions, STXTransferRegularOptions, STXTransferSponsoredOptions, - StacksProvider, - SignTransactionOptions, } from '@stacks/connect'; -import { StructuredDataSignatureRequestOptions } from '@stacks/connect/src/types/structuredDataSignature'; import { useContext } from 'react'; import { ConnectContext, ConnectDispatchContext, States } from '../components/connect/context'; @@ -71,7 +71,7 @@ export const useConnect = () => { void authenticate(_options, provider); return; } else { - showBlockstackConnect({ + void showBlockstackConnect({ ...authOptions, sendToSignIn: false, }); diff --git a/packages/connect-ui/readme.md b/packages/connect-ui/README.md similarity index 100% rename from packages/connect-ui/readme.md rename to packages/connect-ui/README.md diff --git a/packages/connect-ui/src/components.d.ts b/packages/connect-ui/src/components.d.ts index 7bedbaee..62c4057f 100644 --- a/packages/connect-ui/src/components.d.ts +++ b/packages/connect-ui/src/components.d.ts @@ -5,14 +5,14 @@ * It contains typing information for all components that exist in this project. */ import { HTMLStencilElement, JSXBase } from "@stencil/core/internal"; -import { WebBTCProvider } from "./providers"; +import { WbipProvider } from "./providers"; export namespace Components { interface ConnectModal { "callback": Function; "cancelCallback": Function; - "defaultProviders": WebBTCProvider[]; - "installedProviders": WebBTCProvider[]; - "persistSelection": boolean; + "defaultProviders": WbipProvider[]; + "installedProviders": WbipProvider[]; + "persistWalletSelect": boolean; } } declare global { @@ -30,9 +30,9 @@ declare namespace LocalJSX { interface ConnectModal { "callback"?: Function; "cancelCallback"?: Function; - "defaultProviders"?: WebBTCProvider[]; - "installedProviders"?: WebBTCProvider[]; - "persistSelection"?: boolean; + "defaultProviders"?: WbipProvider[]; + "installedProviders"?: WbipProvider[]; + "persistWalletSelect"?: boolean; } interface IntrinsicElements { "connect-modal": ConnectModal; diff --git a/packages/connect-ui/src/components/modal/modal.tsx b/packages/connect-ui/src/components/modal/modal.tsx index ff6ab0ab..39d01cf3 100644 --- a/packages/connect-ui/src/components/modal/modal.tsx +++ b/packages/connect-ui/src/components/modal/modal.tsx @@ -1,5 +1,5 @@ import { Component, Element, Prop, h } from '@stencil/core'; -import { WebBTCProvider, getProviderFromId } from '../../providers'; +import { WbipProvider, getProviderFromId } from '../../providers'; import { setSelectedProviderId } from '../../session'; import CloseIcon from './assets/close-icon.svg'; import { getBrowser, getPlatform } from './utils'; @@ -11,10 +11,10 @@ import { getBrowser, getPlatform } from './utils'; shadow: true, }) export class Modal { - @Prop() defaultProviders: WebBTCProvider[]; - @Prop() installedProviders: WebBTCProvider[]; + @Prop() defaultProviders: WbipProvider[]; + @Prop() installedProviders: WbipProvider[]; - @Prop() persistSelection: boolean; + @Prop() persistWalletSelect: boolean; @Prop() callback: Function; @Prop() cancelCallback: Function; @@ -22,7 +22,7 @@ export class Modal { @Element() modalEl: HTMLConnectModalElement; handleSelectProvider(providerId: string) { - if (this.persistSelection) setSelectedProviderId(providerId); + if (this.persistWalletSelect) setSelectedProviderId(providerId); this.callback(getProviderFromId(providerId)); } @@ -45,15 +45,15 @@ export class Modal { // return null; // } - getBrowserUrl(provider: WebBTCProvider) { + getBrowserUrl(provider: WbipProvider) { return provider.chromeWebStoreUrl ?? provider.mozillaAddOnsUrl; } - getMobileUrl(provider: WebBTCProvider) { + getMobileUrl(provider: WbipProvider) { return provider.iOSAppStoreUrl ?? provider.googlePlayStoreUrl; } - getInstallUrl(provider: WebBTCProvider, browser: string, platform: string) { + getInstallUrl(provider: WbipProvider, browser: string, platform: string) { if (platform === 'IOS') { return provider.iOSAppStoreUrl ?? this.getBrowserUrl(provider) ?? provider.webUrl; } else if (browser === 'Chrome') { @@ -115,7 +115,7 @@ export class Modal {

Installed wallets