Skip to content
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 modules/bitgo/.mocharc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ reporter: 'min'
reporter-option:
- 'cdn=true'
- 'json=false'
exit: true
exit: true
18 changes: 9 additions & 9 deletions modules/express/EXTERNAL_SIGNER.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ The file is located at `src/fetchEncryptedPrivKeys.ts`. Before using this tool,
1. Fill in the `TODOs` by providing a valid `accessToken` as well as the list of `walletIds`, grouped by the cryptocurrency.
2. Using the same information as #1, update the .env file with the `accessToken` and `walletIds` information.

| Name | Value | Description |
| ----------------------------------------- | ------ | ---------------------------------------------- |
| BITGO_EXTERNAL_SIGNER_ENV | string | test |
| BITGO_EXTERNAL_SIGNER_ACCESS_TOKEN | string | Access token used for access BitGo Wallets |
| BITGO_EXTERNAL_SIGNER_WALLET_IDS | string | JSON formatted string of wallets and their |
| | | ids, the secret is optional for unencrypted |
| | | private material |
| BITGO_EXTERNAL_SIGNER_WALLET_IDS_WITH_PRV | string | JSON formatted string of wallets ids and |
| | | their encrypted private keys |
| Name | Value | Description |
| ----------------------------------------- | ------ | ------------------------------------------- |
| BITGO_EXTERNAL_SIGNER_ENV | string | test |
| BITGO_EXTERNAL_SIGNER_ACCESS_TOKEN | string | Access token used for access BitGo Wallets |
| BITGO_EXTERNAL_SIGNER_WALLET_IDS | string | JSON formatted string of wallets and their |
| | | ids, the secret is optional for unencrypted |
| | | private material |
| BITGO_EXTERNAL_SIGNER_WALLET_IDS_WITH_PRV | string | JSON formatted string of wallets ids and |
| | | their encrypted private keys |

BITGO_EXTERNAL_SIGNER_WALLET_IDS examples:

Expand Down
7 changes: 4 additions & 3 deletions modules/express/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ $ docker run -it --volume /path/to/certs:/private -p 4000:4000 bitgo/express:lat
```

An alternative way to provide the ssl certification is to export them as environment variables.

```bash
$ export BITGO_SSL_KEY=$(cat /private/cert.key)
$ export BITGO_SSL_CERT=$(cat /private/cert.cert)
Expand Down Expand Up @@ -217,10 +218,10 @@ BitGo Express is able to take configuration options from either command line arg
| -t | --timeout | `BITGO_TIMEOUT` | 305000 | Number of milliseconds to wait before requests made by `bitgo-express` time out. |
| -d | --debug | N/A, use `BITGO_DEBUG_NAMESPACE` instead | N/A | Enable debug output for bitgo-express. This is equivalent to passing `--debugnamespace bitgo:express`. |
| -D | --debugnamespace | `BITGO_DEBUG_NAMESPACE` | N/A | Enable debug output for a particular debug namespace. Multiple debug namespaces can be given as a comma separated list. See the [`bitgo` package README](https://github.com/BitGo/BitGoJS/blob/master/modules/bitgo/README.md#available-debug-namespaces) for a complete list of recognized options, in addition to those listed in the table below. |
| -k | --keypath | `BITGO_KEYPATH` | N/A | Path to SSL .key file (either `keypath` or `sslkey` required if running against production environment). |
| N/A | --sslkey | `BITGO_SSL_KEY` | N/A | The SSL key (either `keypath` or `sslkey` required if running against production environment). |
| -k | --keypath | `BITGO_KEYPATH` | N/A | Path to SSL .key file (either `keypath` or `sslkey` required if running against production environment). |
| N/A | --sslkey | `BITGO_SSL_KEY` | N/A | The SSL key (either `keypath` or `sslkey` required if running against production environment). |
| -c | --crtpath | `BITGO_CRTPATH` | N/A | Path to SSL .crt file (required if running against production environment). |
| N/A | --sslcert | `BITGO_SSL_CERT` | N/A | The SSL cert (either `crtpath` or `sslcert` required if running against production environment). |
| N/A | --sslcert | `BITGO_SSL_CERT` | N/A | The SSL cert (either `crtpath` or `sslcert` required if running against production environment). |
| -u | --customrooturi | `BITGO_CUSTOM_ROOT_URI` | N/A | Force a custom BitGo URI. |
| -n | --custombitcoinnetwork | `BITGO_CUSTOM_BITCOIN_NETWORK` | N/A | Force a custom BitGo network |
| -l | --logfile | `BITGO_LOGFILE` | N/A | Filepath to write access logs. |
Expand Down
3 changes: 1 addition & 2 deletions modules/express/bin/bitgo-express
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ process.on('unhandledRejection', (reason, promise) => {
const { init } = require('../dist/src/expressApp');

if (require.main === module) {
init()
.catch(err => {
init().catch((err) => {
console.log(`Fatal error: ${err.message}`);
console.log(err.stack);
});
Expand Down
19 changes: 10 additions & 9 deletions modules/unspents/docs/input-costs.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
# Input Costs

This document contains the worst-case input costs for various script types and spend types.
The input costs are calculated using the `Dimensions` class from `@bitgo/unspents`.

| Script Type | Chain Codes | Spend Type | Input Size (Virtual Bytes) | Relative Size (p2trMusig2 = 1.00) |
| --- | --- | --- | --- | --- |
| p2sh | 0/1 | all | 298 | 5.14 |
| p2shP2wsh | 10/11 | all | 140 | 2.41 |
| p2wsh | 20/21 | all | 105 | 1.81 |
| p2tr | 30/31 | Script Path, Level 2 (Backup/User, Backup/BitGo) | 116 | 2.00 |
| p2tr | 30/31 | Script Path, Level 1 (User/BitGo) | 108 | 1.86 |
| p2trMusig2 | 40/41 | Script Path (Backup/User, Backup/BitGo) | 108 | 1.86 |
| p2trMusig2 | 40/41 | Key Path (User/BitGo) | 58 | 1.00 |
| Script Type | Chain Codes | Spend Type | Input Size (Virtual Bytes) | Relative Size (p2trMusig2 = 1.00) |
| ----------- | ----------- | ------------------------------------------------ | -------------------------- | --------------------------------- |
| p2sh | 0/1 | all | 298 | 5.14 |
| p2shP2wsh | 10/11 | all | 140 | 2.41 |
| p2wsh | 20/21 | all | 105 | 1.81 |
| p2tr | 30/31 | Script Path, Level 2 (Backup/User, Backup/BitGo) | 116 | 2.00 |
| p2tr | 30/31 | Script Path, Level 1 (User/BitGo) | 108 | 1.86 |
| p2trMusig2 | 40/41 | Script Path (Backup/User, Backup/BitGo) | 108 | 1.86 |
| p2trMusig2 | 40/41 | Key Path (User/BitGo) | 58 | 1.00 |
8 changes: 4 additions & 4 deletions modules/utxo-bin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
This repository contains a CLI tool for parsing BitGo wallet transactions (withdrawals) and
formatting them for terminal output.


# Installation

## npm
Expand Down Expand Up @@ -75,9 +74,9 @@ utxo-bin -n bitcoin parseTx \

Supported transactions formats are

* full-signed transactions
* half-signed transactions in proprietary bitcoinjs-lib format ("legacy")
* half-signed transactions in PSBT/BIP174 format
- full-signed transactions
- half-signed transactions in proprietary bitcoinjs-lib format ("legacy")
- half-signed transactions in PSBT/BIP174 format

Supported encodings are hex and base64.

Expand All @@ -94,6 +93,7 @@ utxo-bin -n bitcoin parseAddress 3QJmV3qfvL9SuYo34YihAf3sRCW3qSinyC --convert
```

## Generate addresses

```
utxo-bin generateAddresses \
--userKey xpub661MyMwAqRbcEvoSo4qrsT5xhByHzUoBjm88hdCPohF1rdQ4TkntuHfccN2N7FbmAmBgmaBxD7VY1QZ43YfgGRLBL37BBkBhYbezgnsPRVP \
Expand Down
8 changes: 4 additions & 4 deletions modules/web-demo/cypress/support/component-index.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<title>Components App</title>
</head>
<body>
<div data-cy-root></div>
</body>
</html>
</html>