Skip to content

Commit

Permalink
Merge branch 'main' into caravan-descriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
bucko13 committed Feb 22, 2024
2 parents 994068e + 936ab05 commit 02a6b97
Show file tree
Hide file tree
Showing 187 changed files with 1,233 additions and 18,833 deletions.
8 changes: 8 additions & 0 deletions .changeset/gold-foxes-turn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@caravan/bitcoin": patch
"@caravan/wallets": patch
"@caravan/psbt": patch
"@caravan/coordinator": patch
---

maintenance patch to cleanup dependencies
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ which is being re-branded as the "Caravan Coordinator". The goal is to have many
more applications built within this ecosystem that can live under the caravan/apps directory.

`caravan/packages` is where the utility libraries live. Their foundation are forked versions of the [`unchained-bitcoin`](https://github.com/unchained-capital/unchained-bitcoin)
and [`unchained-wallets`](https://github.com/unchained-capital/unchained-bitcoin)
and [`unchained-wallets`](https://github.com/unchained-capital/unchained-wallets)
projects. These are being re-branded for legacy support
as `@caravan/bitcoin` and `@caravan/wallets` but moving forward
the expectation is that they will be split up as well. For
example the `psbt` module in `unchained-bitcoin` will become
example the `psbt` module in `@caravan/bitcoin` will become
`@caravan/psbt`.


Expand Down
8 changes: 3 additions & 5 deletions apps/coordinator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
"@trezor/transport": "^1.1.15",
"@types/redux": "^3.6.0",
"@vitejs/plugin-react": "^3.1.0",
"axios": "^0.21.2",
"axios": "^1.6.7",
"base58check": "^2.0.0",
"bignumber.js": "^9.0.0",
"bip32": "^2.0.4",
Expand All @@ -118,7 +118,7 @@
"hi-base32": "^0.5.0",
"history": "^5.0.0",
"lodash": "^4.17.19",
"material-table": "^2.0.3",
"material-table": "^2.0.5",
"moment": "^2.24.0",
"notistack": "^3.0.0",
"pako": "^1.0.10",
Expand All @@ -141,8 +141,6 @@
"redux-promise": "^0.6.0",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"sass": "^1.56.2",
"unchained-bitcoin": "^1.2.1",
"unchained-wallets": "^1.0.4"
"sass": "^1.56.2"
}
}
2 changes: 1 addition & 1 deletion apps/coordinator/src/actions/transactionActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
satoshisToBitcoins,
networkData,
autoLoadPSBT,
} from "unchained-bitcoin";
} from "@caravan/bitcoin";
import { getSpendableSlices, getConfirmedBalance } from "../selectors/wallet";
import { DUST_IN_BTC } from "../utils/constants";

Expand Down
2 changes: 1 addition & 1 deletion apps/coordinator/src/actions/walletActions.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {
estimateMultisigTransactionFee,
satoshisToBitcoins,
} from "unchained-bitcoin";
} from "@caravan/bitcoin";

import BigNumber from "bignumber.js";
import { fetchAddressUTXOs } from "../blockchain";
Expand Down
2 changes: 1 addition & 1 deletion apps/coordinator/src/bitcoind.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios";
import BigNumber from "bignumber.js";
import { bitcoinsToSatoshis } from "unchained-bitcoin";
import { bitcoinsToSatoshis } from "@caravan/bitcoin";

async function callBitcoind(url, auth, method, params = []) {
// FIXME
Expand Down
2 changes: 1 addition & 1 deletion apps/coordinator/src/block_explorer.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios";
import BigNumber from "bignumber.js";
import { satoshisToBitcoins, blockExplorerAPIURL } from "unchained-bitcoin";
import { satoshisToBitcoins, blockExplorerAPIURL } from "@caravan/bitcoin";

// FIXME: hack
const delay = () => {
Expand Down
2 changes: 1 addition & 1 deletion apps/coordinator/src/blockchain.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { sortInputs } from "unchained-bitcoin";
import { sortInputs } from "@caravan/bitcoin";
import BigNumber from "bignumber.js";
import {
blockExplorerGetAddresesUTXOs,
Expand Down
2 changes: 1 addition & 1 deletion apps/coordinator/src/components/AddressTypePicker.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { P2SH, P2SH_P2WSH, P2WSH } from "unchained-bitcoin";
import { P2SH, P2SH_P2WSH, P2WSH } from "@caravan/bitcoin";

// Components
import {
Expand Down
2 changes: 1 addition & 1 deletion apps/coordinator/src/components/BitcoinIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import { SvgIcon } from "@mui/material";
import { Network } from "unchained-bitcoin";
import { Network } from "@caravan/bitcoin";

interface BitcoinIconProps {
network:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useEffect, useState } from "react";
import PropTypes from "prop-types";
import { COLDCARD } from "unchained-wallets";
import { COLDCARD } from "@caravan/wallets";
import { Box, FormGroup } from "@mui/material";
import { Network, P2SH } from "unchained-bitcoin";
import { Network, P2SH } from "@caravan/bitcoin";
import { ColdcardJSONReader } from ".";
import IndirectExtendedPublicKeyImporter from "../Wallet/IndirectExtendedPublicKeyImporter";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Dropzone from "react-dropzone";
import { Buffer } from "buffer/";
import { Box, Button, FormHelperText, Grid, TextField } from "@mui/material";
import { CloudUpload as UploadIcon } from "@mui/icons-material";
import { PSBT_MAGIC_HEX } from "unchained-bitcoin";
import { PSBT_MAGIC_HEX } from "@caravan/bitcoin";
import styles from "./ColdcardFileReader.module.scss";

const ColdcardFileReaderBase = ({
Expand Down
4 changes: 2 additions & 2 deletions apps/coordinator/src/components/Coldcard/ColdcardSigner.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import PropTypes from "prop-types";
import moment from "moment";
import { COLDCARD, ConfigAdapter } from "unchained-wallets";
import { COLDCARD, ConfigAdapter } from "@caravan/wallets";
import { connect } from "react-redux";
import { ColdcardSigningButtons } from ".";
import { ColdcardPSBTReader } from "./ColdcardFileReader";
Expand All @@ -16,7 +16,7 @@ const ColdcardSigner = ({
interaction,
setActive,
}) => {
// This tries to reshape it to a Coldcard Wallet Config via unchained-wallets
// This tries to reshape it to a Coldcard Wallet Config via @caravan/wallets
const reshapeConfig = (walletDetails) => {
const walletConfig = JSON.parse(walletDetails);
const { startingAddressIndex } = walletConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
multisigRedeemScript,
multisigWitnessScript,
validatePublicKey,
} from "unchained-bitcoin";
} from "@caravan/bitcoin";
import {
Box,
Grid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
validateExtendedPublicKeyForNetwork,
deriveChildPublicKey,
validateBIP32Path,
} from "unchained-bitcoin";
} from "@caravan/bitcoin";

// Components
import { Button, TextField, FormHelperText, Box, Grid } from "@mui/material";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
ExportPublicKey,
TREZOR,
LEDGER,
} from "unchained-wallets";
import { validateBIP32Path } from "unchained-bitcoin";
} from "@caravan/wallets";
import { validateBIP32Path } from "@caravan/bitcoin";

// Components
import { Button, TextField, FormHelperText, Box, Grid } from "@mui/material";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import PropTypes from "prop-types";
import { HERMIT, ExportPublicKey } from "unchained-wallets";
import { validateBIP32Path } from "unchained-bitcoin";
import { HERMIT, ExportPublicKey } from "@caravan/wallets";
import { validateBIP32Path } from "@caravan/bitcoin";

// Components
import { FormGroup, FormHelperText } from "@mui/material";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useState, useEffect } from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { validatePublicKey as baseValidatePublicKey } from "unchained-bitcoin";
import { TREZOR, LEDGER } from "unchained-wallets";
import { validatePublicKey as baseValidatePublicKey } from "@caravan/bitcoin";
import { TREZOR, LEDGER } from "@caravan/wallets";

// Components
import {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import PropTypes from "prop-types";
import { HermitExportExtendedPublicKey } from "unchained-wallets";
import { HermitExportExtendedPublicKey } from "@caravan/wallets";
import { FormGroup, FormHelperText } from "@mui/material";

import HermitReader from "./HermitReader";
Expand Down
2 changes: 1 addition & 1 deletion apps/coordinator/src/components/Hermit/HermitReader.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from "react";
import PropTypes from "prop-types";
import { PENDING, ACTIVE, BCURDecoder } from "unchained-wallets";
import { PENDING, ACTIVE, BCURDecoder } from "@caravan/wallets";
import { QrReader } from "react-qr-reader";
import {
Grid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import {
networkData,
parseSignatureArrayFromPSBT,
unsignedMultisigPSBT,
} from "unchained-bitcoin";
} from "@caravan/bitcoin";
import {
HERMIT,
PENDING,
UNSUPPORTED,
SignMultisigTransaction,
} from "unchained-wallets";
} from "@caravan/wallets";
import { Grid, Box, TextField, Button, FormHelperText } from "@mui/material";
import { Psbt } from "bitcoinjs-lib";
import HermitReader from "./HermitReader";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import React from "react";
import PropTypes from "prop-types";
import { parseSignatureArrayFromPSBT } from "unchained-bitcoin";
import { parseSignatureArrayFromPSBT } from "@caravan/bitcoin";
import {
HERMIT,
PENDING,
UNSUPPORTED,
SignMultisigTransaction,
} from "unchained-wallets";
} from "@caravan/wallets";
import { Grid, Box, Button } from "@mui/material";
import HermitDisplayer from "./HermitDisplayer";
import InteractionMessages from "../InteractionMessages";
Expand Down
2 changes: 1 addition & 1 deletion apps/coordinator/src/components/InteractionMessages.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import React from "react";
import PropTypes from "prop-types";
import { INFO, WARNING, ERROR } from "unchained-wallets";
import { INFO, WARNING, ERROR } from "@caravan/wallets";
import {
Box,
Typography,
Expand Down
2 changes: 1 addition & 1 deletion apps/coordinator/src/components/MultisigDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
multisigRequiredSigners,
multisigTotalSigners,
blockExplorerAddressURL,
} from "unchained-bitcoin";
} from "@caravan/bitcoin";
import { Typography, Grid, Box, Chip } from "@mui/material";
import { OpenInNew } from "@mui/icons-material";
import { externalLink } from "utils/ExternalLink";
Expand Down
2 changes: 1 addition & 1 deletion apps/coordinator/src/components/NetworkPicker.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { Network } from "unchained-bitcoin";
import { Network } from "@caravan/bitcoin";

// Components

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import { Button } from "@mui/material";
import { useDispatch, useSelector } from "react-redux";
import { COLDCARD, ConfigAdapter } from "unchained-wallets";
import { COLDCARD, ConfigAdapter } from "@caravan/wallets";
import { getWalletConfig } from "../../selectors/wallet";
import { setErrorNotification } from "../../actions/errorNotificationActions";
import { downloadFile } from "../../utils";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { useState } from "react";
import { Button } from "@mui/material";
import { useDispatch, useSelector } from "react-redux";
import { LEDGER, RegisterWalletPolicy } from "unchained-wallets";
import { LEDGER, RegisterWalletPolicy } from "@caravan/wallets";
import { getWalletConfig } from "../../selectors/wallet";
import { updateWalletPolicyRegistrationsAction } from "../../actions/walletActions";
import { setErrorNotification } from "../../actions/errorNotificationActions";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from "react";
import PropTypes from "prop-types";
import { connect } from "react-redux";
import { validatePublicKey, validateBIP32Path } from "unchained-bitcoin";
import { TREZOR, LEDGER } from "unchained-wallets";
import { validatePublicKey, validateBIP32Path } from "@caravan/bitcoin";
import { TREZOR, LEDGER } from "@caravan/wallets";

// Components
import CheckIcon from "@mui/icons-material/Check";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import React from "react";
import PropTypes from "prop-types";
import { satoshisToBitcoins } from "unchained-bitcoin";
import { satoshisToBitcoins } from "@caravan/bitcoin";
import {
PENDING,
UNSUPPORTED,
ACTIVE,
ERROR,
SignMultisigTransaction,
} from "unchained-wallets";
} from "@caravan/wallets";
import {
Button,
TextField,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
UNSUPPORTED,
SignMultisigTransaction,
ACTIVE,
} from "unchained-wallets";
} from "@caravan/wallets";
import {
Box,
FormHelperText,
Expand All @@ -16,7 +16,7 @@ import {
TableBody,
FormGroup,
} from "@mui/material";
import { satoshisToBitcoins } from "unchained-bitcoin";
import { satoshisToBitcoins } from "@caravan/bitcoin";
import InteractionMessages from "../InteractionMessages";

class IndirectSignatureImporter extends React.Component {
Expand Down Expand Up @@ -155,7 +155,7 @@ class IndirectSignatureImporter extends React.Component {

// We have a slight issue for the n-ly signed PSBT case
// because there is no order to the pubkey: [signature(s)] mapping
// returned from `unchained-bitcoin`. it's ok, we have valid signatures, etc.
// returned from `@caravan/bitcoin`. it's ok, we have valid signatures, etc.
// but truncating information can cause problems down the line in keeping
// the validation straightforward.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
satoshisToBitcoins,
bitcoinsToSatoshis,
validateOutputAmount,
} from "unchained-bitcoin";
} from "@caravan/bitcoin";
import BigNumber from "bignumber.js";
import {
Grid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from "prop-types";
import { connect } from "react-redux";
import { map } from "lodash";
import BigNumber from "bignumber.js";
import { bitcoinsToSatoshis, satoshisToBitcoins } from "unchained-bitcoin";
import { bitcoinsToSatoshis, satoshisToBitcoins } from "@caravan/bitcoin";
import {
Grid,
Button,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
multisigRequiredSigners,
multisigTotalSigners,
toHexString,
} from "unchained-bitcoin";
} from "@caravan/bitcoin";
import {
Box,
Grid,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
multisigBIP32Root,
validateBIP32Path,
getMaskedDerivation,
} from "unchained-bitcoin";
import { TREZOR, LEDGER, HERMIT, COLDCARD } from "unchained-wallets";
} from "@caravan/bitcoin";
import { TREZOR, LEDGER, HERMIT, COLDCARD } from "@caravan/wallets";
import {
Card,
CardHeader,
Expand Down Expand Up @@ -450,7 +450,7 @@ class SignatureImporter extends React.Component {
// Loop over inputs and check the sigs array to see if you can find a public key or not.
// NOTE - signaturesToCheck.length could be much larger than inputs.length!
// This is *not* efficient, but it will work as a temporary solution until we refactor
// the signatures data structure returned from unchained-bitcoin or change how caravan
// the signatures data structure returned from @caravan/bitcoin or change how caravan
// validates signatures.

// The "sets" of signatures that come out of this process are not all connected / tied to the same root xpub
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { connect } from "react-redux";
import {
signedMultisigTransaction,
blockExplorerTransactionURL,
} from "unchained-bitcoin";
} from "@caravan/bitcoin";

import {
Typography,
Expand Down
Loading

0 comments on commit 02a6b97

Please sign in to comment.