Skip to content

Commit 0e14f60

Browse files
committed
Merge remote-tracking branch 'origin/master' into WP-5415-express-migrate-api-v2-coin-wallet-generate-to-typed-routes
TICKET: WP-5415
2 parents d03a236 + 2828138 commit 0e14f60

File tree

498 files changed

+35428
-4034
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

498 files changed

+35428
-4034
lines changed

.github/workflows/ci.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,13 +288,52 @@ jobs:
288288
context: .
289289
file: ./Dockerfile
290290
push: false
291+
load: true
291292
tags: |
292293
bitgo/express:${{ github.sha }}
293294
build-args: |
294295
VERSION=${{ steps.build-info.outputs.version }}
295296
BUILD_DATE=${{ steps.build-info.outputs.date }}
296297
GIT_HASH=${{ github.sha }}
297298
299+
- name: Test Express Docker image
300+
id: docker-test
301+
run: |
302+
echo "Testing Docker image bitgo/express:${{ github.sha }}"
303+
304+
CONTAINER_ID=$(docker run -d -p 3080:3080 bitgo/express:${{ github.sha }})
305+
echo "Started container: $CONTAINER_ID"
306+
307+
# Wait for the service to be ready with timeout
308+
echo "Waiting for service to be ready..."
309+
310+
for i in {1..30}; do
311+
if curl -f -s --max-time 5 http://localhost:3080/api/v2/ping > /dev/null 2>&1; then
312+
echo "✅ API health check passed"
313+
break
314+
fi
315+
316+
if [ $i -eq 30 ]; then
317+
echo "::error::API health check failed after 30 attempts"
318+
docker logs "$CONTAINER_ID"
319+
docker stop "$CONTAINER_ID"
320+
docker rm "$CONTAINER_ID"
321+
exit 1
322+
fi
323+
324+
echo "Waiting for API... (attempt $i/30)"
325+
sleep 2
326+
done
327+
328+
# Check container logs for errors
329+
docker logs "$CONTAINER_ID"
330+
331+
# Stop the container
332+
docker stop "$CONTAINER_ID"
333+
docker rm "$CONTAINER_ID"
334+
335+
echo "✅ Docker image tests passed"
336+
298337
dockerfile-check:
299338
runs-on: ubuntu-latest
300339

@@ -315,7 +354,7 @@ jobs:
315354
path: |
316355
node_modules
317356
modules/*/node_modules
318-
key: ${{ runner.os }}-node22-${{ hashFiles('yarn.lock') }}-${{ hashFiles('tsconfig.packages.json') }}-${{ hashFiles('package.json') }}
357+
key: ${{ runner.os }}-node22-${{ hashFiles('yarn.lock') }}-${{ hashFiles('tsconfig.packages.json')}}-${{ hashFiles('**/package.json') }}
319358

320359
- name: Install Packages
321360
if: steps.lerna-cache.outputs.cache-hit != 'true' || contains( github.event.pull_request.labels.*.name, 'SKIP_CACHE')

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@
6060
/modules/sdk-coin-baby/ @BitGo/ethalt-team
6161
/modules/sdk-coin-bera/ @BitGo/ethalt-team
6262
/modules/sdk-coin-bsc/ @BitGo/ethalt-team
63+
/module/sdk-coin-canton/ @BitGo/ethalt-team
6364
/modules/sdk-coin-coredao/ @BitGo/ethalt-team
6465
/modules/sdk-coin-cosmos/ @BitGo/ethalt-team
6566
/modules/sdk-coin-cronos/ @BitGo/ethalt-team

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ COPY --from=builder /tmp/bitgo/modules/sdk-coin-baby /var/modules/sdk-coin-baby/
7272
COPY --from=builder /tmp/bitgo/modules/sdk-coin-bera /var/modules/sdk-coin-bera/
7373
COPY --from=builder /tmp/bitgo/modules/sdk-coin-bld /var/modules/sdk-coin-bld/
7474
COPY --from=builder /tmp/bitgo/modules/sdk-coin-bsc /var/modules/sdk-coin-bsc/
75+
COPY --from=builder /tmp/bitgo/modules/sdk-coin-canton /var/modules/sdk-coin-canton/
7576
COPY --from=builder /tmp/bitgo/modules/sdk-coin-celo /var/modules/sdk-coin-celo/
7677
COPY --from=builder /tmp/bitgo/modules/sdk-coin-coredao /var/modules/sdk-coin-coredao/
7778
COPY --from=builder /tmp/bitgo/modules/sdk-coin-coreum /var/modules/sdk-coin-coreum/
@@ -123,7 +124,6 @@ COPY --from=builder /tmp/bitgo/modules/sdk-coin-bsv /var/modules/sdk-coin-bsv/
123124
COPY --from=builder /tmp/bitgo/modules/sdk-coin-btc /var/modules/sdk-coin-btc/
124125
COPY --from=builder /tmp/bitgo/modules/utxo-ord /var/modules/utxo-ord/
125126
COPY --from=builder /tmp/bitgo/modules/sdk-coin-btg /var/modules/sdk-coin-btg/
126-
COPY --from=builder /tmp/bitgo/modules/sdk-coin-canton /var/modules/sdk-coin-canton/
127127
COPY --from=builder /tmp/bitgo/modules/sdk-coin-dash /var/modules/sdk-coin-dash/
128128
COPY --from=builder /tmp/bitgo/modules/sdk-coin-doge /var/modules/sdk-coin-doge/
129129
COPY --from=builder /tmp/bitgo/modules/sdk-coin-eos /var/modules/sdk-coin-eos/
@@ -169,6 +169,7 @@ cd /var/modules/sdk-coin-baby && yarn link && \
169169
cd /var/modules/sdk-coin-bera && yarn link && \
170170
cd /var/modules/sdk-coin-bld && yarn link && \
171171
cd /var/modules/sdk-coin-bsc && yarn link && \
172+
cd /var/modules/sdk-coin-canton && yarn link && \
172173
cd /var/modules/sdk-coin-celo && yarn link && \
173174
cd /var/modules/sdk-coin-coredao && yarn link && \
174175
cd /var/modules/sdk-coin-coreum && yarn link && \
@@ -220,7 +221,6 @@ cd /var/modules/sdk-coin-bsv && yarn link && \
220221
cd /var/modules/sdk-coin-btc && yarn link && \
221222
cd /var/modules/utxo-ord && yarn link && \
222223
cd /var/modules/sdk-coin-btg && yarn link && \
223-
cd /var/modules/sdk-coin-canton && yarn link && \
224224
cd /var/modules/sdk-coin-dash && yarn link && \
225225
cd /var/modules/sdk-coin-doge && yarn link && \
226226
cd /var/modules/sdk-coin-eos && yarn link && \
@@ -269,6 +269,7 @@ RUN cd /var/bitgo-express && \
269269
yarn link @bitgo/sdk-coin-bera && \
270270
yarn link @bitgo/sdk-coin-bld && \
271271
yarn link @bitgo/sdk-coin-bsc && \
272+
yarn link @bitgo/sdk-coin-canton && \
272273
yarn link @bitgo/sdk-coin-celo && \
273274
yarn link @bitgo/sdk-coin-coredao && \
274275
yarn link @bitgo/sdk-coin-coreum && \
@@ -320,7 +321,6 @@ RUN cd /var/bitgo-express && \
320321
yarn link @bitgo/sdk-coin-btc && \
321322
yarn link @bitgo/utxo-ord && \
322323
yarn link @bitgo/sdk-coin-btg && \
323-
yarn link @bitgo/sdk-coin-canton && \
324324
yarn link @bitgo/sdk-coin-dash && \
325325
yarn link @bitgo/sdk-coin-doge && \
326326
yarn link @bitgo/sdk-coin-eos && \

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ module.exports = {
6565
'COIN-',
6666
'FIAT-',
6767
'ME-',
68+
'ANT-',
6869
'#', // Prefix used by GitHub issues
6970
],
7071
},

examples/ts/create-go-account.ts

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
/**
2+
* Create a Go Account wallet at BitGo.
3+
* This makes use of the convenience function generateWallet with type: 'trading'
4+
*
5+
* IMPORTANT: You must backup the encrypted private key and encrypted wallet passphrase!
6+
*
7+
* Copyright 2025, BitGo, Inc. All Rights Reserved.
8+
*/
9+
10+
import { BitGoAPI } from '@bitgo/sdk-api';
11+
import { coins } from 'bitgo';
12+
require('dotenv').config({ path: '../../.env' });
13+
14+
const bitgo = new BitGoAPI({
15+
accessToken: process.env.TESTNET_ACCESS_TOKEN,
16+
env: 'test', // Change this to env: 'production' when you are ready for production
17+
});
18+
19+
// Go Accounts use the 'ofc' (Off-Chain) coin
20+
const coin = 'ofc';
21+
bitgo.register(coin, coins.Ofc.createInstance);
22+
23+
// TODO: set a label for your new Go Account here
24+
const label = 'Example Go Account Wallet';
25+
26+
// TODO: set your passphrase for your new wallet here (encrypts the private key)
27+
const passphrase = 'go_account_wallet_passphrase';
28+
29+
// TODO: set your passcode encryption code here (encrypts the passphrase itself)
30+
const passcodeEncryptionCode = 'encryption_code_for_passphrase';
31+
32+
// TODO: set your enterprise ID for your new wallet here
33+
const enterprise = 'your_enterprise_id';
34+
35+
async function main() {
36+
const response = await bitgo.coin(coin).wallets().generateWallet({
37+
label,
38+
passphrase,
39+
passcodeEncryptionCode,
40+
enterprise,
41+
type: 'trading', // Required for Go Accounts
42+
});
43+
44+
// Type guard to ensure we got a Go Account response
45+
if (!('userKeychain' in response)) {
46+
throw new Error('Go account missing required user keychain');
47+
}
48+
49+
const { wallet, userKeychain, encryptedWalletPassphrase } = response;
50+
51+
console.log(`Wallet ID: ${wallet.id()}`);
52+
53+
console.log('BACKUP THE FOLLOWING INFORMATION: ');
54+
console.log('User Keychain:');
55+
console.log(`Keychain ID: ${userKeychain.id}`);
56+
console.log(`Public Key: ${userKeychain.pub}`);
57+
console.log(`Encrypted Private Key: ${userKeychain.encryptedPrv}`);
58+
59+
console.log(`Encrypted Wallet Passphrase: ${encryptedWalletPassphrase}`);
60+
61+
// Create receive address for Go Account
62+
const receiveAddress = await wallet.createAddress();
63+
console.log('Go Account Receive Address:', receiveAddress.address);
64+
}
65+
66+
main().catch((e) => console.error('Error creating Go Account:', e));
67+

examples/ts/share-wallet.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ bitgo.register(coin, Tbtc.createInstance);
2222
const walletId = '';
2323

2424
// TODO: set BitGo account email of wallet share recipient
25-
const recipient = null;
25+
const recipient = "recipient_email";
2626

2727
// TODO: set share permissions as a comma-separated list
2828
// Valid permissions to choose from are: view, spend, manage, admin
2929
const perms = 'view';
3030

3131
// TODO: provide the passphrase for the wallet being shared
32-
const passphrase = null;
32+
const passphrase = "passhrase";
3333

3434
async function main() {
3535
const wallet = await bitgo.coin(coin).wallets().get({ id: walletId });

modules/abstract-cosmos/CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,52 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [11.15.7](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-10-21)
7+
8+
**Note:** Version bump only for package @bitgo/abstract-cosmos
9+
10+
11+
12+
13+
14+
## [11.15.6](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-10-16)
15+
16+
**Note:** Version bump only for package @bitgo/abstract-cosmos
17+
18+
19+
20+
21+
22+
## [11.15.5](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-10-13)
23+
24+
**Note:** Version bump only for package @bitgo/abstract-cosmos
25+
26+
27+
28+
29+
30+
## [11.15.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-10-09)
31+
32+
33+
### Bug Fixes
34+
35+
* run check-fmt on code files only ([9745196](https://github.com/BitGo/BitGoJS/commit/9745196b02b9678c740d290a4638ceb153a8fd75))
36+
37+
38+
39+
40+
41+
## [11.15.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-10-08)
42+
43+
44+
### Bug Fixes
45+
46+
* add explicit 'files' in package json ([3b00373](https://github.com/BitGo/BitGoJS/commit/3b0037396f6ac16bb9380bd85bf37f2b133068f4))
47+
48+
49+
50+
51+
652
## [11.15.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-10-02)
753

854
**Note:** Version bump only for package @bitgo/abstract-cosmos

modules/abstract-cosmos/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "@bitgo/abstract-cosmos",
3-
"version": "11.15.2",
3+
"version": "11.15.7",
44
"description": "BitGo SDK coin library for COSMOS base implementation",
55
"main": "./dist/src/index.js",
66
"types": "./dist/src/index.d.ts",
77
"scripts": {
88
"build": "npm run prepare",
99
"build-ts": "yarn tsc --build --incremental --verbose .",
1010
"fmt": "prettier --write .",
11-
"check-fmt": "prettier --check .",
11+
"check-fmt": "prettier --check '**/*.{ts,js,json}'",
1212
"clean": "rm -r ./dist",
1313
"lint": "eslint --quiet .",
1414
"prepare": "npm run build-ts && shx cp -r ./resources ./dist"
@@ -38,10 +38,10 @@
3838
]
3939
},
4040
"dependencies": {
41-
"@bitgo/sdk-core": "^36.10.1",
42-
"@bitgo/sdk-lib-mpc": "^10.7.0",
43-
"@bitgo/secp256k1": "^1.5.0",
44-
"@bitgo/statics": "^58.2.0",
41+
"@bitgo/sdk-core": "^36.15.0",
42+
"@bitgo/sdk-lib-mpc": "^10.8.1",
43+
"@bitgo/secp256k1": "^1.6.0",
44+
"@bitgo/statics": "^58.7.0",
4545
"@cosmjs/amino": "^0.29.5",
4646
"@cosmjs/crypto": "^0.30.1",
4747
"@cosmjs/encoding": "^0.29.5",

modules/abstract-eth/CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,52 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [24.13.7](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-10-21)
7+
8+
**Note:** Version bump only for package @bitgo/abstract-eth
9+
10+
11+
12+
13+
14+
## [24.13.6](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-10-16)
15+
16+
**Note:** Version bump only for package @bitgo/abstract-eth
17+
18+
19+
20+
21+
22+
## [24.13.5](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-10-13)
23+
24+
**Note:** Version bump only for package @bitgo/abstract-eth
25+
26+
27+
28+
29+
30+
## [24.13.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-10-09)
31+
32+
33+
### Bug Fixes
34+
35+
* run check-fmt on code files only ([9745196](https://github.com/BitGo/BitGoJS/commit/9745196b02b9678c740d290a4638ceb153a8fd75))
36+
37+
38+
39+
40+
41+
## [24.13.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-10-08)
42+
43+
44+
### Bug Fixes
45+
46+
* add explicit 'files' in package json ([3b00373](https://github.com/BitGo/BitGoJS/commit/3b0037396f6ac16bb9380bd85bf37f2b133068f4))
47+
48+
49+
50+
51+
652
## [24.13.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-10-02)
753

854
**Note:** Version bump only for package @bitgo/abstract-eth

modules/abstract-eth/package.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"name": "@bitgo/abstract-eth",
3-
"version": "24.13.2",
3+
"version": "24.13.7",
44
"description": "BitGo SDK coin library for ETH base implementation",
55
"main": "./dist/src/index.js",
66
"types": "./dist/src/index.d.ts",
77
"scripts": {
88
"build": "yarn tsc --build --incremental --verbose .",
99
"fmt": "prettier --write .",
10-
"check-fmt": "prettier --check .",
10+
"check-fmt": "prettier --check '**/*.{ts,js,json}'",
1111
"clean": "rm -r ./dist",
1212
"lint": "eslint --quiet .",
1313
"prepare": "npm run build",
@@ -40,10 +40,10 @@
4040
]
4141
},
4242
"dependencies": {
43-
"@bitgo/sdk-core": "^36.10.1",
44-
"@bitgo/sdk-lib-mpc": "^10.7.0",
45-
"@bitgo/secp256k1": "^1.5.0",
46-
"@bitgo/statics": "^58.2.0",
43+
"@bitgo/sdk-core": "^36.15.0",
44+
"@bitgo/sdk-lib-mpc": "^10.8.1",
45+
"@bitgo/secp256k1": "^1.6.0",
46+
"@bitgo/statics": "^58.7.0",
4747
"@ethereumjs/common": "^2.6.5",
4848
"@ethereumjs/rlp": "^4.0.0",
4949
"@ethereumjs/tx": "^3.3.0",
@@ -60,8 +60,8 @@
6060
"superagent": "^9.0.1"
6161
},
6262
"devDependencies": {
63-
"@bitgo/sdk-api": "^1.69.2",
64-
"@bitgo/sdk-test": "^9.1.2",
63+
"@bitgo/sdk-api": "^1.70.4",
64+
"@bitgo/sdk-test": "^9.1.7",
6565
"@types/keccak": "^3.0.5"
6666
},
6767
"gitHead": "18e460ddf02de2dbf13c2aa243478188fb539f0c",

0 commit comments

Comments
 (0)