diff --git a/apps/playground/src/components/cardano/connect-browser-wallet.tsx b/apps/playground/src/components/cardano/connect-browser-wallet.tsx index b933b0f39..33a8e6f07 100644 --- a/apps/playground/src/components/cardano/connect-browser-wallet.tsx +++ b/apps/playground/src/components/cardano/connect-browser-wallet.tsx @@ -31,6 +31,9 @@ export function CommonCardanoWallet() { }, announce: [ "wss://dev.btt.cf-identity-wallet.metadata.dev.cf-deployments.org", + "wss://dev.tracker.cf-identity-wallet.metadata.dev.cf-deployments.org", + "wss://tracker.files.fm:7073/announce", + "wss://tracker.de-0.eternl.art", ], }} burnerWallet={{ diff --git a/apps/playground/src/pages/react/ui-components/connect-wallet.tsx b/apps/playground/src/pages/react/ui-components/connect-wallet.tsx index 102f9de9e..31ff53190 100644 --- a/apps/playground/src/pages/react/ui-components/connect-wallet.tsx +++ b/apps/playground/src/pages/react/ui-components/connect-wallet.tsx @@ -1,5 +1,3 @@ -import { CardanoWallet } from "@meshsdk/react"; - import { CommonCardanoWallet } from "~/components/cardano/connect-browser-wallet"; import Link from "~/components/link"; import LiveCodeDemo from "~/components/sections/live-code-demo"; @@ -121,10 +119,20 @@ function Left() {

CIP 95

You can also provide an extensions object to enable - specific CIPs. For example, to enable CIP95, you would pass: + specific CIPs. For example, to enable{" "} + CIP-95, you + would pass:

+

Decentralized WebRTC dApp-Wallet Communication (CIP 45)

+

+ CIP-45 is a + communication method between dApps and wallets based on WebTorrent + trackers and WebRTC. Using WebTorrent trackers for the peer discovery to + remove the need of this central component. +

+

Burner wallet

Burner wallets are wallets that are created on the fly on the user's @@ -137,8 +145,6 @@ function Left() { } function Right() { - const isDark = useDarkmode((state) => state.isDark); - let example = ``; example += `import { CardanoWallet } from '@meshsdk/react';\n`; example += `\n`; diff --git a/packages/mesh-common/package.json b/packages/mesh-common/package.json index 5c7ea7c8f..5c32d5f0f 100644 --- a/packages/mesh-common/package.json +++ b/packages/mesh-common/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/common", - "version": "1.7.27", + "version": "1.7.28", "description": "Contains constants, types and interfaces used across the SDK and different serialization libraries", "main": "./dist/index.cjs", "browser": "./dist/index.js", diff --git a/packages/mesh-contract/package.json b/packages/mesh-contract/package.json index f0decdac8..2f088e16c 100644 --- a/packages/mesh-contract/package.json +++ b/packages/mesh-contract/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/contract", - "version": "1.7.27", + "version": "1.7.28", "description": "List of open-source smart contracts, complete with documentation, live demos, and end-to-end source code. https://meshjs.dev/smart-contracts", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -34,9 +34,9 @@ "typescript": "^5.3.3" }, "dependencies": { - "@meshsdk/common": "1.7.27", - "@meshsdk/core": "1.7.27", - "@meshsdk/core-csl": "1.7.27" + "@meshsdk/common": "1.7.28", + "@meshsdk/core": "1.7.28", + "@meshsdk/core-csl": "1.7.28" }, "prettier": "@meshsdk/configs/prettier", "publishConfig": { diff --git a/packages/mesh-core-csl/package.json b/packages/mesh-core-csl/package.json index 2ff92243b..73bef66c2 100644 --- a/packages/mesh-core-csl/package.json +++ b/packages/mesh-core-csl/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/core-csl", - "version": "1.7.27", + "version": "1.7.28", "description": "Types and utilities functions between Mesh and cardano-serialization-lib", "main": "./dist/index.cjs", "module": "./dist/index.js", @@ -31,7 +31,7 @@ }, "devDependencies": { "@meshsdk/configs": "*", - "@meshsdk/provider": "1.7.27", + "@meshsdk/provider": "1.7.28", "@types/json-bigint": "^1.0.4", "eslint": "^8.57.0", "ts-jest": "^29.1.4", @@ -39,7 +39,7 @@ "typescript": "^5.3.3" }, "dependencies": { - "@meshsdk/common": "1.7.27", + "@meshsdk/common": "1.7.28", "@sidan-lab/sidan-csl-rs-browser": "0.9.8", "@sidan-lab/sidan-csl-rs-nodejs": "0.9.8", "@types/base32-encoding": "^1.0.2", diff --git a/packages/mesh-core-cst/package.json b/packages/mesh-core-cst/package.json index 0bfc24736..f9d246d92 100644 --- a/packages/mesh-core-cst/package.json +++ b/packages/mesh-core-cst/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/core-cst", - "version": "1.7.27", + "version": "1.7.28", "description": "Types and utilities functions between Mesh and cardano-js-sdk", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -42,7 +42,7 @@ "@harmoniclabs/cbor": "1.3.0", "@harmoniclabs/plutus-data": "1.2.4", "@harmoniclabs/uplc": "1.2.4", - "@meshsdk/common": "1.7.27", + "@meshsdk/common": "1.7.28", "@stricahq/bip32ed25519": "^1.1.0", "@stricahq/cbors": "^1.0.3", "pbkdf2": "^3.1.2" diff --git a/packages/mesh-core/package.json b/packages/mesh-core/package.json index dbe8c8d46..cff52079e 100644 --- a/packages/mesh-core/package.json +++ b/packages/mesh-core/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/core", - "version": "1.7.27", + "version": "1.7.28", "description": "Mesh SDK Core - https://meshjs.dev/", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -33,13 +33,13 @@ "typescript": "^5.3.3" }, "dependencies": { - "@meshsdk/common": "1.7.27", - "@meshsdk/core-csl": "1.7.27", - "@meshsdk/core-cst": "1.7.27", - "@meshsdk/provider": "1.7.27", - "@meshsdk/react": "1.7.27", - "@meshsdk/transaction": "1.7.27", - "@meshsdk/wallet": "1.7.27" + "@meshsdk/common": "1.7.28", + "@meshsdk/core-csl": "1.7.28", + "@meshsdk/core-cst": "1.7.28", + "@meshsdk/provider": "1.7.28", + "@meshsdk/react": "1.7.28", + "@meshsdk/transaction": "1.7.28", + "@meshsdk/wallet": "1.7.28" }, "prettier": "@meshsdk/configs/prettier", "publishConfig": { diff --git a/packages/mesh-provider/package.json b/packages/mesh-provider/package.json index 7f83a84a6..0732fcc92 100644 --- a/packages/mesh-provider/package.json +++ b/packages/mesh-provider/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/provider", - "version": "1.7.27", + "version": "1.7.28", "description": "Blockchain data providers - https://meshjs.dev/providers", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -34,8 +34,8 @@ "typescript": "^5.3.3" }, "dependencies": { - "@meshsdk/common": "1.7.27", - "@meshsdk/core-cst": "1.7.27", + "@meshsdk/common": "1.7.28", + "@meshsdk/core-cst": "1.7.28", "@utxorpc/sdk": "0.6.2", "@utxorpc/spec": "0.10.1", "axios": "^1.7.2" diff --git a/packages/mesh-react/package.json b/packages/mesh-react/package.json index 8df7ab9c5..931b5fe3e 100644 --- a/packages/mesh-react/package.json +++ b/packages/mesh-react/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/react", - "version": "1.7.27", + "version": "1.7.28", "description": "React component library - https://meshjs.dev/react", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -29,9 +29,9 @@ }, "dependencies": { "@fabianbormann/cardano-peer-connect": "^1.2.18", - "@meshsdk/common": "1.7.27", - "@meshsdk/transaction": "1.7.27", - "@meshsdk/wallet": "1.7.27", + "@meshsdk/common": "1.7.28", + "@meshsdk/transaction": "1.7.28", + "@meshsdk/wallet": "1.7.28", "@radix-ui/react-dialog": "^1.1.2", "@radix-ui/react-dropdown-menu": "^2.1.2", "@radix-ui/react-icons": "^1.3.2", diff --git a/packages/mesh-react/src/cardano-wallet/connected-button.tsx b/packages/mesh-react/src/cardano-wallet/connected-button.tsx index e8e34be6c..103cdc985 100644 --- a/packages/mesh-react/src/cardano-wallet/connected-button.tsx +++ b/packages/mesh-react/src/cardano-wallet/connected-button.tsx @@ -28,7 +28,7 @@ export default function ConnectedButton() { return ( - + diff --git a/packages/mesh-react/src/cardano-wallet/index.tsx b/packages/mesh-react/src/cardano-wallet/index.tsx index 23ca7f52a..e79bbc5fd 100644 --- a/packages/mesh-react/src/cardano-wallet/index.tsx +++ b/packages/mesh-react/src/cardano-wallet/index.tsx @@ -89,7 +89,10 @@ export const CardanoWallet = ({ /> )} {screen == "p2p" && ( - + )} {screen == "burner" && burnerWallet && ( (null); const qrCodeField = useRef(null); const [address, setAddress] = useState(""); const [copied, setCopied] = useState(false); + const { connect } = useWallet(); useEffect(() => { if (cardanoPeerConnect) { @@ -28,23 +32,25 @@ export default function ScreenP2P({ url: cardanoPeerConnect.dAppInfo.url, }, announce: cardanoPeerConnect.announce, - onApiInject: (name: string, address: string) => { - console.log("onApiInject", name, address); + onApiInject: async (name: string, address: string) => { + console.log(5, "onApiInject", name, address); + await connect(name); + setOpen(false); }, onApiEject: (name: string, address: string) => { - console.log("onApiEject", name, address); + console.log(5, "onApiEject", name, address); }, onConnect: (address: string, walletInfo?: IWalletInfo) => { - console.log("Connected to wallet", address, walletInfo); + console.log(5, "Connected to wallet", address, walletInfo); }, onDisconnect: () => { - console.log("Disconnected from wallet"); + console.log(5, "Disconnected from wallet"); }, verifyConnection: ( walletInfo: IWalletInfo, callback: (granted: boolean, autoconnect: boolean) => void, ) => { - console.log("verifyConnection", walletInfo); + console.log(5, "verifyConnection", walletInfo); callback(true, true); }, useWalletDiscovery: true, @@ -53,8 +59,6 @@ export default function ScreenP2P({ if (dAppConnect.current) { const address = dAppConnect.current.getAddress(); setAddress(address); - console.log("address", address); - if (qrCodeField.current !== null) { dAppConnect.current.generateQRCode(qrCodeField.current); } diff --git a/packages/mesh-svelte/package.json b/packages/mesh-svelte/package.json index 3414f7027..70f18825a 100644 --- a/packages/mesh-svelte/package.json +++ b/packages/mesh-svelte/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/svelte", - "version": "1.7.27", + "version": "1.7.28", "description": "Svelte component library - https://meshjs.dev/svelte", "type": "module", "exports": { @@ -26,7 +26,7 @@ "dev": "vite dev" }, "dependencies": { - "@meshsdk/core": "1.7.27" + "@meshsdk/core": "1.7.28" }, "devDependencies": { "@meshsdk/configs": "*", diff --git a/packages/mesh-transaction/package.json b/packages/mesh-transaction/package.json index a9c116a33..002a72686 100644 --- a/packages/mesh-transaction/package.json +++ b/packages/mesh-transaction/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/transaction", - "version": "1.7.27", + "version": "1.7.28", "description": "Transactions - https://meshjs.dev/apis/transaction", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -35,9 +35,9 @@ "typescript": "^5.3.3" }, "dependencies": { - "@meshsdk/common": "1.7.27", - "@meshsdk/core-csl": "1.7.27", - "@meshsdk/core-cst": "1.7.27", + "@meshsdk/common": "1.7.28", + "@meshsdk/core-csl": "1.7.28", + "@meshsdk/core-cst": "1.7.28", "json-bigint": "^1.0.0" }, "prettier": "@meshsdk/configs/prettier", diff --git a/packages/mesh-wallet/package.json b/packages/mesh-wallet/package.json index f7ba05c9a..6a7bb48a9 100644 --- a/packages/mesh-wallet/package.json +++ b/packages/mesh-wallet/package.json @@ -1,6 +1,6 @@ { "name": "@meshsdk/wallet", - "version": "1.7.27", + "version": "1.7.28", "description": "Wallets - https://meshjs.dev/apis/wallets", "main": "./dist/index.cjs", "browser": "./dist/index.js", @@ -35,10 +35,10 @@ "typescript": "^5.3.3" }, "dependencies": { - "@meshsdk/common": "1.7.27", - "@meshsdk/core-csl": "1.7.27", - "@meshsdk/core-cst": "1.7.27", - "@meshsdk/transaction": "1.7.27", + "@meshsdk/common": "1.7.28", + "@meshsdk/core-csl": "1.7.28", + "@meshsdk/core-cst": "1.7.28", + "@meshsdk/transaction": "1.7.28", "@nufi/dapp-client-cardano": "0.3.5", "@nufi/dapp-client-core": "0.3.5" }, diff --git a/scripts/mesh-cli/package.json b/scripts/mesh-cli/package.json index c889f717a..ddd698052 100644 --- a/scripts/mesh-cli/package.json +++ b/scripts/mesh-cli/package.json @@ -3,7 +3,7 @@ "description": "A quick and easy way to bootstrap your dApps on Cardano using Mesh.", "homepage": "https://meshjs.dev", "author": "MeshJS", - "version": "1.7.27", + "version": "1.7.28", "license": "Apache-2.0", "type": "module", "main": "./dist/index.cjs", diff --git a/scripts/mesh-cli/src/actions/create.ts b/scripts/mesh-cli/src/actions/create.ts index fe8d9c4fa..703411c89 100644 --- a/scripts/mesh-cli/src/actions/create.ts +++ b/scripts/mesh-cli/src/actions/create.ts @@ -12,8 +12,9 @@ export const create = async (name, options) => { const template = options.template ?? (await askUser('What template do you want to use?', [ - { title: "Aiken", value: "mesh-aiken" }, { title: "NextJS", value: "mesh-nextjs" }, + { title: "Svelte", value: "mesh-svelte" }, + { title: "Aiken", value: "mesh-aiken" }, ])); console.log('\n'); diff --git a/scripts/mesh-cli/src/index.ts b/scripts/mesh-cli/src/index.ts index 2fc44cc3d..c5fa78ea8 100644 --- a/scripts/mesh-cli/src/index.ts +++ b/scripts/mesh-cli/src/index.ts @@ -7,7 +7,7 @@ import { InvalidArgumentError, } from "commander"; import { create } from "./actions"; -import { logError, logSuccess } from "./utils"; +import { logError, logSuccess, logInfo } from "./utils"; const main = async () => { console.clear(); @@ -72,6 +72,7 @@ const main = async () => { main() .then(() => { logSuccess("✨✨ Welcome to Web 3.0! ✨✨"); + logInfo('Run "cd " and "npm run dev" to start your dApp.'); process.exit(0); }) .catch((error) => {