Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init roll back and bump version #415

Merged
merged 1 commit into from
Nov 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/mesh-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/common",
"version": "1.7.21",
"version": "1.7.22",
"description": "Contains constants, types and interfaces used across the SDK and different serialization libraries",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down
8 changes: 4 additions & 4 deletions packages/mesh-contract/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/contract",
"version": "1.7.21",
"version": "1.7.22",
"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",
Expand Down Expand Up @@ -34,9 +34,9 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@meshsdk/common": "1.7.21",
"@meshsdk/core": "1.7.21",
"@meshsdk/core-csl": "1.7.21"
"@meshsdk/common": "1.7.22",
"@meshsdk/core": "1.7.22",
"@meshsdk/core-csl": "1.7.22"
},
"prettier": "@meshsdk/configs/prettier",
"publishConfig": {
Expand Down
6 changes: 3 additions & 3 deletions packages/mesh-core-csl/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/core-csl",
"version": "1.7.21",
"version": "1.7.22",
"description": "Types and utilities functions between Mesh and cardano-serialization-lib",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
Expand Down Expand Up @@ -31,15 +31,15 @@
},
"devDependencies": {
"@meshsdk/configs": "*",
"@meshsdk/provider": "1.7.21",
"@meshsdk/provider": "1.7.22",
"@types/json-bigint": "^1.0.4",
"eslint": "^8.57.0",
"ts-jest": "^29.1.4",
"tsup": "^8.0.2",
"typescript": "^5.3.3"
},
"dependencies": {
"@meshsdk/common": "1.7.21",
"@meshsdk/common": "1.7.22",
"@sidan-lab/sidan-csl-rs-browser": "0.9.6",
"@sidan-lab/sidan-csl-rs-nodejs": "0.9.6",
"@types/base32-encoding": "^1.0.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/mesh-core-cst/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/core-cst",
"version": "1.7.21",
"version": "1.7.22",
"description": "Types and utilities functions between Mesh and cardano-js-sdk",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down Expand Up @@ -42,7 +42,7 @@
"@harmoniclabs/cbor": "1.3.0",
"@harmoniclabs/plutus-data": "1.2.4",
"@harmoniclabs/uplc": "1.2.4",
"@meshsdk/common": "1.7.21",
"@meshsdk/common": "1.7.22",
"@stricahq/bip32ed25519": "^1.1.0",
"@stricahq/cbors": "^1.0.3",
"pbkdf2": "^3.1.2"
Expand Down
16 changes: 8 additions & 8 deletions packages/mesh-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/core",
"version": "1.7.21",
"version": "1.7.22",
"description": "Mesh SDK Core - https://meshjs.dev/",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down Expand Up @@ -33,13 +33,13 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@meshsdk/common": "1.7.21",
"@meshsdk/core-csl": "1.7.21",
"@meshsdk/core-cst": "1.7.21",
"@meshsdk/provider": "1.7.21",
"@meshsdk/react": "1.7.21",
"@meshsdk/transaction": "1.7.21",
"@meshsdk/wallet": "1.7.21"
"@meshsdk/common": "1.7.22",
"@meshsdk/core-csl": "1.7.22",
"@meshsdk/core-cst": "1.7.22",
"@meshsdk/provider": "1.7.22",
"@meshsdk/react": "1.7.22",
"@meshsdk/transaction": "1.7.22",
"@meshsdk/wallet": "1.7.22"
},
"prettier": "@meshsdk/configs/prettier",
"publishConfig": {
Expand Down
6 changes: 3 additions & 3 deletions packages/mesh-provider/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/provider",
"version": "1.7.21",
"version": "1.7.22",
"description": "Blockchain data providers - https://meshjs.dev/providers",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down Expand Up @@ -34,8 +34,8 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@meshsdk/common": "1.7.21",
"@meshsdk/core-cst": "1.7.21",
"@meshsdk/common": "1.7.22",
"@meshsdk/core-cst": "1.7.22",
"@utxorpc/sdk": "0.6.2",
"@utxorpc/spec": "0.10.1",
"axios": "^1.7.2"
Expand Down
8 changes: 4 additions & 4 deletions packages/mesh-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/react",
"version": "1.7.21",
"version": "1.7.22",
"description": "React component library - https://meshjs.dev/react",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down Expand Up @@ -29,9 +29,9 @@
},
"dependencies": {
"@fabianbormann/cardano-peer-connect": "^1.2.18",
"@meshsdk/common": "1.7.21",
"@meshsdk/transaction": "1.7.21",
"@meshsdk/wallet": "1.7.21",
"@meshsdk/common": "1.7.22",
"@meshsdk/transaction": "1.7.22",
"@meshsdk/wallet": "1.7.22",
"@radix-ui/react-dialog": "^1.1.2",
"@radix-ui/react-dropdown-menu": "^2.1.2",
"@radix-ui/react-icons": "^1.3.2",
Expand Down
158 changes: 79 additions & 79 deletions packages/mesh-react/src/cardano-wallet/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* - handle show when no wallet in device
*/
import { useEffect, useRef, useState } from "react";
import { DAppPeerConnect } from "@fabianbormann/cardano-peer-connect";
import { IWalletInfo } from "@fabianbormann/cardano-peer-connect/dist/src/types";
// import { DAppPeerConnect } from "@fabianbormann/cardano-peer-connect";
// import { IWalletInfo } from "@fabianbormann/cardano-peer-connect/dist/src/types";

import { Button } from "../common/button";
import {
Expand Down Expand Up @@ -108,9 +108,9 @@ export const CardanoWallet = ({
setScreen={setScreen}
/>
)}
{screen == "p2p" && (
{/* {screen == "p2p" && (
<P2PScreen cardanoPeerConnect={cardanoPeerConnect} />
)}
)} */}

<DialogFooter className="mesh-justify-center mesh-text-sm">
<a
Expand Down Expand Up @@ -216,7 +216,7 @@ function MainScreen({
setScreen("p2p");
}}
/>
<WalletIcon
{/* <WalletIcon
iconReactNode={IconDownload()}
name={`P2P`}
action={() => {
Expand All @@ -225,84 +225,84 @@ function MainScreen({
"_blank",
);
}}
/>
/> */}
</div>
);
}

function P2PScreen({
cardanoPeerConnect,
}: {
cardanoPeerConnect?: {
dAppInfo: {
name: string;
url: string;
};
announce: string[];
};
}) {
const dAppConnect = useRef<DAppPeerConnect | null>(null);
const qrCodeField = useRef<HTMLDivElement | null>(null);
const [address, setAddress] = useState("");
const [copied, setCopied] = useState(false);
const [connected, setConnected] = useState(false);
console.log("address", address);
// function P2PScreen({
// cardanoPeerConnect,
// }: {
// cardanoPeerConnect?: {
// dAppInfo: {
// name: string;
// url: string;
// };
// announce: string[];
// };
// }) {
// const dAppConnect = useRef<DAppPeerConnect | null>(null);
// const qrCodeField = useRef<HTMLDivElement | null>(null);
// const [address, setAddress] = useState("");
// const [copied, setCopied] = useState(false);
// const [connected, setConnected] = useState(false);
// console.log("address", address);

useEffect(() => {
if (cardanoPeerConnect) {
if (dAppConnect.current === null) {
dAppConnect.current = new DAppPeerConnect({
dAppInfo: {
name: cardanoPeerConnect.dAppInfo.name,
url: cardanoPeerConnect.dAppInfo.url,
},
announce: cardanoPeerConnect.announce,
onApiInject: (name: string, address: string) => {
console.log("onApiInject", name, address);
},
onApiEject: (name: string, address: string) => {
console.log("onApiEject", name, address);
},
onConnect: (address: string, walletInfo?: IWalletInfo) => {
console.log("Connected to wallet", address, walletInfo);
},
onDisconnect: () => {
console.log("Disconnected from wallet");
},
verifyConnection: (
walletInfo: IWalletInfo,
callback: (granted: boolean, autoconnect: boolean) => void,
) => {
console.log("verifyConnection", walletInfo);
callback(true, true);
},
useWalletDiscovery: true,
});
console.log(1, dAppConnect.current);
if (dAppConnect.current) {
setAddress(dAppConnect.current.getAddress());
// useEffect(() => {
// if (cardanoPeerConnect) {
// if (dAppConnect.current === null) {
// dAppConnect.current = new DAppPeerConnect({
// dAppInfo: {
// name: cardanoPeerConnect.dAppInfo.name,
// url: cardanoPeerConnect.dAppInfo.url,
// },
// announce: cardanoPeerConnect.announce,
// onApiInject: (name: string, address: string) => {
// console.log("onApiInject", name, address);
// },
// onApiEject: (name: string, address: string) => {
// console.log("onApiEject", name, address);
// },
// onConnect: (address: string, walletInfo?: IWalletInfo) => {
// console.log("Connected to wallet", address, walletInfo);
// },
// onDisconnect: () => {
// console.log("Disconnected from wallet");
// },
// verifyConnection: (
// walletInfo: IWalletInfo,
// callback: (granted: boolean, autoconnect: boolean) => void,
// ) => {
// console.log("verifyConnection", walletInfo);
// callback(true, true);
// },
// useWalletDiscovery: true,
// });
// console.log(1, dAppConnect.current);
// if (dAppConnect.current) {
// setAddress(dAppConnect.current.getAddress());

if (qrCodeField.current !== null) {
dAppConnect.current.generateQRCode(qrCodeField.current);
}
}
}
}
}, []);
// if (qrCodeField.current !== null) {
// dAppConnect.current.generateQRCode(qrCodeField.current);
// }
// }
// }
// }
// }, []);

return (
<div className="mesh-flex mesh-flex-col mesh-items-center mesh-justify-center">
<div style={{ marginTop: 16, marginBottom: 16 }} ref={qrCodeField}></div>
<Button
variant="outline"
className="mesh-text-white"
onClick={() => {
navigator.clipboard.writeText(address);
setCopied(true);
}}
>
{copied ? "Copied" : "Copy Address"}
</Button>
</div>
);
}
// return (
// <div className="mesh-flex mesh-flex-col mesh-items-center mesh-justify-center">
// <div style={{ marginTop: 16, marginBottom: 16 }} ref={qrCodeField}></div>
// <Button
// variant="outline"
// className="mesh-text-white"
// onClick={() => {
// navigator.clipboard.writeText(address);
// setCopied(true);
// }}
// >
// {copied ? "Copied" : "Copy Address"}
// </Button>
// </div>
// );
// }
6 changes: 3 additions & 3 deletions packages/mesh-svelte/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
"dev": "vite dev"
},
"dependencies": {
"@meshsdk/common": "1.7.21",
"@meshsdk/transaction": "1.7.21",
"@meshsdk/wallet": "1.7.21"
"@meshsdk/common": "1.7.22",
"@meshsdk/transaction": "1.7.22",
"@meshsdk/wallet": "1.7.22"
},
"devDependencies": {
"@meshsdk/configs": "*",
Expand Down
8 changes: 4 additions & 4 deletions packages/mesh-transaction/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/transaction",
"version": "1.7.21",
"version": "1.7.22",
"description": "Transactions - https://meshjs.dev/apis/transaction",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down Expand Up @@ -35,9 +35,9 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@meshsdk/common": "1.7.21",
"@meshsdk/core-csl": "1.7.21",
"@meshsdk/core-cst": "1.7.21",
"@meshsdk/common": "1.7.22",
"@meshsdk/core-csl": "1.7.22",
"@meshsdk/core-cst": "1.7.22",
"json-bigint": "^1.0.0"
},
"prettier": "@meshsdk/configs/prettier",
Expand Down
10 changes: 5 additions & 5 deletions packages/mesh-wallet/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@meshsdk/wallet",
"version": "1.7.21",
"version": "1.7.22",
"description": "Wallets - https://meshjs.dev/apis/wallets",
"main": "./dist/index.cjs",
"browser": "./dist/index.js",
Expand Down Expand Up @@ -35,10 +35,10 @@
"typescript": "^5.3.3"
},
"dependencies": {
"@meshsdk/common": "1.7.21",
"@meshsdk/core-csl": "1.7.21",
"@meshsdk/core-cst": "1.7.21",
"@meshsdk/transaction": "1.7.21",
"@meshsdk/common": "1.7.22",
"@meshsdk/core-csl": "1.7.22",
"@meshsdk/core-cst": "1.7.22",
"@meshsdk/transaction": "1.7.22",
"@nufi/dapp-client-cardano": "0.3.5",
"@nufi/dapp-client-core": "0.3.5"
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/mesh-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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.21",
"version": "1.7.22",
"license": "Apache-2.0",
"type": "module",
"main": "./dist/index.cjs",
Expand Down