From 880fd0a46e1426d2265f4620fbb85e1dd315943d Mon Sep 17 00:00:00 2001 From: Martin Stefcek Date: Mon, 12 Feb 2024 14:43:46 +0400 Subject: [PATCH] chore: add `@tarilabs` to the bindings package --- applications/tari_dan_wallet_web_ui/package-lock.json | 6 +++--- applications/tari_dan_wallet_web_ui/package.json | 2 +- .../tari_dan_wallet_web_ui/src/Components/StatusChip.tsx | 2 +- .../tari_dan_wallet_web_ui/src/api/hooks/useAccounts.tsx | 2 +- .../src/api/hooks/useTransactions.tsx | 2 +- .../src/routes/AccountDetails/AccountDetails.tsx | 6 ++++-- .../src/routes/AssetVault/Components/AccountDetails.tsx | 2 +- .../src/routes/AssetVault/Components/Assets.tsx | 2 +- .../src/routes/AssetVault/Components/ClaimBurn.tsx | 2 +- .../src/routes/AssetVault/Components/ClaimFees.tsx | 2 +- .../src/routes/AssetVault/Components/SelectAccount.tsx | 2 +- .../src/routes/Transactions/Events.tsx | 2 +- .../src/routes/Transactions/FeeInstructions.tsx | 2 +- .../src/routes/Transactions/Instructions.tsx | 2 +- .../tari_dan_wallet_web_ui/src/routes/Transactions/Logs.tsx | 2 +- .../src/routes/Transactions/Substates.tsx | 2 +- .../src/routes/Transactions/TransactionDetails.tsx | 2 +- .../src/routes/Transactions/Transactions.tsx | 2 +- .../src/routes/Wallet/Components/AccessTokens.tsx | 2 +- .../src/routes/Wallet/Components/Accounts.tsx | 2 +- applications/tari_dan_wallet_web_ui/src/utils/helpers.tsx | 2 +- applications/tari_dan_wallet_web_ui/src/utils/json_rpc.tsx | 2 +- bindings/package.json | 2 +- clients/javascript/wallet_daemon_client/package-lock.json | 2 +- 24 files changed, 29 insertions(+), 27 deletions(-) diff --git a/applications/tari_dan_wallet_web_ui/package-lock.json b/applications/tari_dan_wallet_web_ui/package-lock.json index bb5ecee07..ac70826f6 100644 --- a/applications/tari_dan_wallet_web_ui/package-lock.json +++ b/applications/tari_dan_wallet_web_ui/package-lock.json @@ -21,7 +21,7 @@ "react-dom": "^18.2.0", "react-icons": "^4.9.0", "react-router-dom": "^6.9.0", - "tari-bindings": "file:../../bindings", + "@tarilabs/typescript-bindings": "file:../../bindings", "use-react-router-breadcrumbs": "^4.0.1", "zustand": "^4.4.1", "zustand-persist": "^0.1.6" @@ -36,7 +36,7 @@ } }, "../../bindings": { - "name": "tari-bindings", + "name": "@tarilabs/typescript-bindings", "version": "1.0.0", "license": "ISC", "devDependencies": { @@ -1840,7 +1840,7 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/tari-bindings": { + "node_modules/@tarilabs/typescript-bindings": { "resolved": "../../bindings", "link": true }, diff --git a/applications/tari_dan_wallet_web_ui/package.json b/applications/tari_dan_wallet_web_ui/package.json index d9f2c8696..e57d833ee 100644 --- a/applications/tari_dan_wallet_web_ui/package.json +++ b/applications/tari_dan_wallet_web_ui/package.json @@ -22,7 +22,7 @@ "react-dom": "^18.2.0", "react-icons": "^4.9.0", "react-router-dom": "^6.9.0", - "tari-bindings": "file:../../bindings", + "@tarilabs/typescript-bindings": "file:../../bindings", "use-react-router-breadcrumbs": "^4.0.1", "zustand": "^4.4.1", "zustand-persist": "^0.1.6" diff --git a/applications/tari_dan_wallet_web_ui/src/Components/StatusChip.tsx b/applications/tari_dan_wallet_web_ui/src/Components/StatusChip.tsx index 27ce2fbf3..f0df34451 100644 --- a/applications/tari_dan_wallet_web_ui/src/Components/StatusChip.tsx +++ b/applications/tari_dan_wallet_web_ui/src/Components/StatusChip.tsx @@ -23,7 +23,7 @@ import { Chip, Avatar } from "@mui/material"; import { IoCheckmarkOutline, IoDiamondOutline, IoReload, IoHourglassOutline, IoCloseOutline } from "react-icons/io5"; import { useTheme } from "@mui/material/styles"; -import { TransactionStatus } from "tari-bindings"; +import { TransactionStatus } from "@tarilabs/typescript-bindings"; interface StatusChipProps { status: TransactionStatus; diff --git a/applications/tari_dan_wallet_web_ui/src/api/hooks/useAccounts.tsx b/applications/tari_dan_wallet_web_ui/src/api/hooks/useAccounts.tsx index 035af95ae..d0e9c2208 100644 --- a/applications/tari_dan_wallet_web_ui/src/api/hooks/useAccounts.tsx +++ b/applications/tari_dan_wallet_web_ui/src/api/hooks/useAccounts.tsx @@ -35,7 +35,7 @@ import { } from "../../utils/json_rpc"; import { apiError } from "../helpers/types"; import queryClient from "../queryClient"; -import { AccountsListResponse, Arg, ComponentAccessRules } from "tari-bindings"; +import { AccountsListResponse, Arg, ComponentAccessRules } from "@tarilabs/typescript-bindings"; // Fees are passed as strings because Amount is tagged export const useAccountsClaimBurn = (account: string, claimProof: string, fee: number) => { diff --git a/applications/tari_dan_wallet_web_ui/src/api/hooks/useTransactions.tsx b/applications/tari_dan_wallet_web_ui/src/api/hooks/useTransactions.tsx index 04a7b0f36..efd1f6f69 100644 --- a/applications/tari_dan_wallet_web_ui/src/api/hooks/useTransactions.tsx +++ b/applications/tari_dan_wallet_web_ui/src/api/hooks/useTransactions.tsx @@ -24,7 +24,7 @@ import { useQuery } from "@tanstack/react-query"; import { transactionsGet, transactionsGetAll } from "../../utils/json_rpc"; import { apiError } from "../helpers/types"; -import { TransactionGetAllResponse, TransactionStatus } from "tari-bindings"; +import { TransactionGetAllResponse, TransactionStatus } from "@tarilabs/typescript-bindings"; const useTransactionDetails = (hash: string) => { return useQuery({ diff --git a/applications/tari_dan_wallet_web_ui/src/routes/AccountDetails/AccountDetails.tsx b/applications/tari_dan_wallet_web_ui/src/routes/AccountDetails/AccountDetails.tsx index 55a544fc9..1708f78c9 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/AccountDetails/AccountDetails.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/AccountDetails/AccountDetails.tsx @@ -35,7 +35,7 @@ import { shortenString } from "../../utils/helpers"; import { DataTableCell } from "../../Components/StyledComponents"; import CopyToClipboard from "../../Components/CopyToClipboard"; import FetchStatusCheck from "../../Components/FetchStatusCheck"; -import { Account, AccountNftInfo, BalanceEntry, substateIdToString } from "tari-bindings"; +import { Account, AccountNftInfo, BalanceEntry, substateIdToString } from "@tarilabs/typescript-bindings"; function BalanceRow(props: BalanceEntry) { return ( @@ -164,7 +164,9 @@ function AccountDetailsLayout() { - {nftsListData?.nfts.map((nft: AccountNftInfo, index: number) => )} + {nftsListData?.nfts.map((nft: AccountNftInfo, index: number) => ( + + ))} diff --git a/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/AccountDetails.tsx b/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/AccountDetails.tsx index e149a0adf..3b571f1cf 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/AccountDetails.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/AccountDetails.tsx @@ -27,7 +27,7 @@ import { GridHeadCell, GridDataCell } from "../../../Components/StyledComponents import { useAccountsGet } from "../../../api/hooks/useAccounts"; import { shortenString } from "../../../utils/helpers"; import { styled } from "@mui/material/styles"; -import { substateIdToString } from "tari-bindings"; +import { substateIdToString } from "@tarilabs/typescript-bindings"; const GridContainer = styled(Box)(({ theme }) => ({ display: "grid", diff --git a/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/Assets.tsx b/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/Assets.tsx index 0f0507a08..8b0d04b6e 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/Assets.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/Assets.tsx @@ -37,7 +37,7 @@ import { DataTableCell } from "../../../Components/StyledComponents"; import { useAccountNFTsList, useAccountsGetBalances } from "../../../api/hooks/useAccounts"; import useAccountStore from "../../../store/accountStore"; import { shortenString } from "../../../utils/helpers"; -import { AccountNftInfo, BalanceEntry } from "tari-bindings"; +import { AccountNftInfo, BalanceEntry } from "@tarilabs/typescript-bindings"; interface TabPanelProps { children?: React.ReactNode; diff --git a/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/ClaimBurn.tsx b/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/ClaimBurn.tsx index ee3c4298f..508e5f0cb 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/ClaimBurn.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/ClaimBurn.tsx @@ -37,7 +37,7 @@ import { useTheme } from "@mui/material/styles"; import { accountsClaimBurn } from "../../../utils/json_rpc"; import useAccountStore from "../../../store/accountStore"; import { useKeysList } from "../../../api/hooks/useKeys"; -import { AccountInfo, AccountsListResponse } from "tari-bindings"; +import { AccountInfo, AccountsListResponse } from "@tarilabs/typescript-bindings"; export default function ClaimBurn() { const [open, setOpen] = useState(false); diff --git a/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/ClaimFees.tsx b/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/ClaimFees.tsx index c49589dd6..72777806e 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/ClaimFees.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/ClaimFees.tsx @@ -36,7 +36,7 @@ import useAccountStore from "../../../store/accountStore"; import { FormControl, InputLabel, MenuItem, Select, SelectChangeEvent } from "@mui/material"; import { useKeysList } from "../../../api/hooks/useKeys"; import { validatorsClaimFees } from "../../../utils/json_rpc"; -import { AccountInfo } from "tari-bindings"; +import { AccountInfo } from "@tarilabs/typescript-bindings"; export default function ClaimFees() { const [open, setOpen] = useState(false); diff --git a/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/SelectAccount.tsx b/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/SelectAccount.tsx index 40a2cd10f..4e638bb45 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/SelectAccount.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/AssetVault/Components/SelectAccount.tsx @@ -32,7 +32,7 @@ import Select, { SelectChangeEvent } from "@mui/material/Select"; import Dialog from "./AddAccount"; import useAccountStore from "../../../store/accountStore"; import { useAccountsList } from "../../../api/hooks/useAccounts"; -import { AccountInfo } from "tari-bindings"; +import { AccountInfo } from "@tarilabs/typescript-bindings"; function SelectAccount() { const { accountName, setAccountName } = useAccountStore(); diff --git a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Events.tsx b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Events.tsx index 9e0145e4c..b1f1cf574 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Events.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Events.tsx @@ -30,7 +30,7 @@ import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown"; import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp"; import CodeBlockExpand from "../../Components/CodeBlock"; import { useTheme } from "@mui/material/styles"; -import { Event } from "tari-bindings"; +import { Event } from "@tarilabs/typescript-bindings"; function RowData({ component_address, template_address, topic, tx_hash, payload }: Event, index: number) { const [open, setOpen] = useState(false); diff --git a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/FeeInstructions.tsx b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/FeeInstructions.tsx index 0468a9f9c..61982e9b0 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/FeeInstructions.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/FeeInstructions.tsx @@ -27,7 +27,7 @@ import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown"; import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp"; import CodeBlockExpand from "../../Components/CodeBlock"; import { useTheme } from "@mui/material/styles"; -import { Instruction } from "tari-bindings"; +import { Instruction } from "@tarilabs/typescript-bindings"; function RowData({ title, data }: { title: string; data: Instruction }, index: number) { const [open, setOpen] = useState(false); diff --git a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Instructions.tsx b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Instructions.tsx index d4000caa8..15e13b827 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Instructions.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Instructions.tsx @@ -27,7 +27,7 @@ import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown"; import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp"; import CodeBlockExpand from "../../Components/CodeBlock"; import { useTheme } from "@mui/material/styles"; -import { Instruction } from "tari-bindings"; +import { Instruction } from "@tarilabs/typescript-bindings"; function RowData({ title, data }: { title: string; data: Instruction }, index: number) { const [open, setOpen] = useState(false); diff --git a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Logs.tsx b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Logs.tsx index 4f6edbaaa..a88b822c8 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Logs.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Logs.tsx @@ -22,7 +22,7 @@ import { TableContainer, Table, TableHead, TableRow, TableCell, TableBody } from "@mui/material"; import { DataTableCell } from "../../Components/StyledComponents"; -import { LogEntry } from "tari-bindings"; +import { LogEntry } from "@tarilabs/typescript-bindings"; export default function Logs({ data }: { data: Array }) { return ( diff --git a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Substates.tsx b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Substates.tsx index f49b6216b..2e5b4c90a 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Substates.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Substates.tsx @@ -29,7 +29,7 @@ import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp"; import { IoArrowDownCircle, IoArrowUpCircle } from "react-icons/io5"; import CodeBlockExpand from "../../Components/CodeBlock"; import { useTheme } from "@mui/material/styles"; -import { Substate, SubstateId, TransactionResult } from "tari-bindings"; +import { Substate, SubstateId, TransactionResult } from "@tarilabs/typescript-bindings"; function RowData({ info, state }: { info: [SubstateId, Substate | number]; state: string }, index: number) { const [open, setOpen] = useState(false); diff --git a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/TransactionDetails.tsx b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/TransactionDetails.tsx index d1434a84f..3fd0c8e25 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/TransactionDetails.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/TransactionDetails.tsx @@ -45,7 +45,7 @@ import { TransactionResult, getRejectReasonFromTransactionResult, rejectReasonToString, -} from "tari-bindings"; +} from "@tarilabs/typescript-bindings"; export default function TransactionDetails() { const [expandedPanels, setExpandedPanels] = useState([]); diff --git a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Transactions.tsx b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Transactions.tsx index 60ea77083..f1aca45ed 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Transactions.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/Transactions/Transactions.tsx @@ -41,7 +41,7 @@ import { DataTableCell } from "../../Components/StyledComponents"; import { useGetAllTransactions } from "../../api/hooks/useTransactions"; import { emptyRows, handleChangePage, handleChangeRowsPerPage } from "../../utils/helpers"; import { useAccountsGet } from "../../api/hooks/useAccounts"; -import { FinalizeResult, Transaction, TransactionStatus } from "tari-bindings"; +import { FinalizeResult, Transaction, TransactionStatus } from "@tarilabs/typescript-bindings"; export default function Transactions({ accountName }: { accountName: string }) { const { data: accountsData } = useAccountsGet(accountName); diff --git a/applications/tari_dan_wallet_web_ui/src/routes/Wallet/Components/AccessTokens.tsx b/applications/tari_dan_wallet_web_ui/src/routes/Wallet/Components/AccessTokens.tsx index 9d1907549..833111788 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/Wallet/Components/AccessTokens.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/Wallet/Components/AccessTokens.tsx @@ -49,7 +49,7 @@ import FetchStatusCheck from "../../../Components/FetchStatusCheck"; import { AccordionIconButton, CodeBlock, DataTableCell } from "../../../Components/StyledComponents"; import { useAuthRevokeToken, useGetAllTokens } from "../../../api/hooks/useTokens"; import { shortenString } from "../../../utils/helpers"; -import { Claims, JrpcPermission, JrpcPermissions, jrpcPermissionToString } from "tari-bindings"; +import { Claims, JrpcPermission, JrpcPermissions, jrpcPermissionToString } from "@tarilabs/typescript-bindings"; function AlertDialog({ fn, row }: any) { const [open, setOpen] = useState(false); diff --git a/applications/tari_dan_wallet_web_ui/src/routes/Wallet/Components/Accounts.tsx b/applications/tari_dan_wallet_web_ui/src/routes/Wallet/Components/Accounts.tsx index 2f4eb033c..88b635e2d 100644 --- a/applications/tari_dan_wallet_web_ui/src/routes/Wallet/Components/Accounts.tsx +++ b/applications/tari_dan_wallet_web_ui/src/routes/Wallet/Components/Accounts.tsx @@ -50,7 +50,7 @@ import { } from "../../../api/hooks/useAccounts"; import FetchStatusCheck from "../../../Components/FetchStatusCheck"; import queryClient from "../../../api/queryClient"; -import { AccountInfo } from "tari-bindings"; +import { AccountInfo } from "@tarilabs/typescript-bindings"; function Account(account: AccountInfo, index: number) { const { pathname } = useLocation(); diff --git a/applications/tari_dan_wallet_web_ui/src/utils/helpers.tsx b/applications/tari_dan_wallet_web_ui/src/utils/helpers.tsx index e20585e9e..7873d6a4e 100644 --- a/applications/tari_dan_wallet_web_ui/src/utils/helpers.tsx +++ b/applications/tari_dan_wallet_web_ui/src/utils/helpers.tsx @@ -21,7 +21,7 @@ // USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. import { ChangeEvent } from "react"; -import { FinalizeResult, SubstateId, Transaction, TransactionStatus } from "tari-bindings"; +import { FinalizeResult, SubstateId, Transaction, TransactionStatus } from "@tarilabs/typescript-bindings"; const renderJson = (json: any) => { if (Array.isArray(json)) { diff --git a/applications/tari_dan_wallet_web_ui/src/utils/json_rpc.tsx b/applications/tari_dan_wallet_web_ui/src/utils/json_rpc.tsx index 41819389f..3d5ade03d 100644 --- a/applications/tari_dan_wallet_web_ui/src/utils/json_rpc.tsx +++ b/applications/tari_dan_wallet_web_ui/src/utils/json_rpc.tsx @@ -94,7 +94,7 @@ import { TransferResponse, WebRtcStartRequest, WebRtcStartResponse, -} from "tari-bindings"; +} from "@tarilabs/typescript-bindings"; let token: String | null = null; let json_id = 0; diff --git a/bindings/package.json b/bindings/package.json index 59e7c1a28..2bb9eb57a 100644 --- a/bindings/package.json +++ b/bindings/package.json @@ -1,5 +1,5 @@ { - "name": "tari-bindings", + "name": "@tarilabs/typescript-bindings", "version": "1.0.0", "description": "", "main": "index.ts", diff --git a/clients/javascript/wallet_daemon_client/package-lock.json b/clients/javascript/wallet_daemon_client/package-lock.json index f0d8c53c7..d9bc1926a 100644 --- a/clients/javascript/wallet_daemon_client/package-lock.json +++ b/clients/javascript/wallet_daemon_client/package-lock.json @@ -16,7 +16,7 @@ } }, "../../../bindings": { - "name": "tari-bindings", + "name": "@tarilabs/typescript-bindings", "version": "1.0.0", "license": "ISC", "devDependencies": {