Skip to content

Commit 5f9a6b1

Browse files
committed
Also modified setupLightningSignerNodeRoutes to utilize the router when setuping up endpoints TICKET: WP-5445
2 parents a007498 + 4a8b2be commit 5f9a6b1

File tree

360 files changed

+14604
-2106
lines changed

Some content is hidden

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

360 files changed

+14604
-2106
lines changed

.github/renovate.json

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
{
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3-
"extends": ["github>BitGo/gha-renovate-bot//presets/onboarding#v1.15.1"],
3+
"extends": ["github>BitGo/gha-renovate-bot//presets/default"],
44
"baseBranches": ["master"],
5-
"enabledManagers": ["github-actions", "regex"],
5+
"enabledManagers": ["github-actions", "regex", "npm"],
6+
"packageRules": [
7+
{
8+
"description": "Disable all npm dependencies by default",
9+
"matchManagers": ["npm"],
10+
"enabled": false
11+
},
12+
{
13+
"description": "Enable updates only for @bitgo/public-types",
14+
"matchPackageNames": ["@bitgo/public-types"],
15+
"enabled": true
16+
}
17+
]
618
}

.github/workflows/ci.yml

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,5 +270,44 @@ jobs:
270270
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
271271
with:
272272
ref: ${{ github.event.pull_request.head.sha }}
273+
274+
- name: Setup Docker compatibility with Podman
275+
run: sudo ln -sf /usr/bin/podman /usr/local/bin/docker
276+
273277
- name: Build BitGoJS Express Docker Image
274-
run: podman build .
278+
run: ./scripts/build-docker-express.sh
279+
280+
dockerfile-check:
281+
runs-on: ubuntu-latest
282+
283+
steps:
284+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
285+
with:
286+
ref: ${{ github.event.pull_request.head.sha }}
287+
288+
- name: Setup node 22
289+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
290+
with:
291+
node-version: 22
292+
293+
- name: restore lerna dependencies
294+
id: lerna-cache
295+
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 #v4.2.3
296+
with:
297+
path: |
298+
node_modules
299+
modules/*/node_modules
300+
key: ${{ runner.os }}-node22-${{ hashFiles('yarn.lock') }}-${{ hashFiles('tsconfig.packages.json') }}-${{ hashFiles('package.json') }}
301+
302+
- name: Install Packages
303+
if: steps.lerna-cache.outputs.cache-hit != 'true' || contains( github.event.pull_request.labels.*.name, 'SKIP_CACHE')
304+
run: yarn install --with-frozen-lockfile --ignore-scripts
305+
306+
- name: Check Dockerfile is up to date
307+
run: |
308+
yarn update-dockerfile
309+
if ! git diff --quiet; then
310+
echo "Dockerfile is not up to date. Please run 'yarn update-dockerfile' and commit the changes."
311+
git diff
312+
exit 1
313+
fi

.iyarc

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
1-
GHSA-3h5v-q93c-6h6q
2-
GHSA-8hc4-vh64-cxmj
3-
GHSA-9wv6-86v2-598j
41
GHSA-3gc7-fjrx-p6mg
5-
GHSA-cpj6-fhp6-mr6j
6-
GHSA-f46r-rw29-r322

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
engine-strict=true

CODEOWNERS

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
/modules/sdk-coin-eos/ @BitGo/ethalt-team
6969
/modules/sdk-coin-evm/ @BitGo/ethalt-team
7070
/modules/sdk-coin-flr/ @BitGo/ethalt-team
71+
/modules/sdk-coin-flrp/ @BitGo/ethalt-team
7172
/modules/sdk-coin-ethlike/ @BitGo/ethalt-team
7273
/modules/sdk-coin-hbar/ @BitGo/ethalt-team
7374
/modules/sdk-coin-icp/ @BitGo/ethalt-team
@@ -108,10 +109,6 @@
108109
/modules/sdk-core/src/bitgo/address-book/ @BitGo/prime
109110
/modules/sdk-core/src/bitgo/trading/ @BitGo/prime
110111

111-
# Asset Metadata Service
112-
/modules/statics/src/coins/botTokens.ts @BitGo/ams
113-
/modules/statics/src/coins/botOfcTokens.ts @BitGo/ams
114-
115112
# Core Modules
116113
/modules/bitgo/ @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
117114
/modules/bitgo/test/v2/unit/lightning/ @BitGo/btc-team
@@ -140,6 +137,10 @@
140137
/types/ @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
141138
/webpack/ @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
142139

140+
# Asset Metadata Service
141+
/modules/statics/src/coins/botTokens.ts @BitGo/ams
142+
/modules/statics/src/coins/botOfcTokens.ts @BitGo/ams
143+
143144
/.eslintrc.json @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform @BitGo/developer-experience
144145
/.prettierrc.yml @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform @BitGo/developer-experience
145146
/check-package-versions.js @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform @BitGo/developer-experience
@@ -148,11 +149,11 @@
148149
/commitlint.config.js @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
149150
/Dockerfile @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
150151
/lerna.json @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform @BitGo/developer-experience @BitGo/devops
151-
/package.json @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform @BitGo/developer-experience @BitGo/devops
152-
**/package.json @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform @BitGo/developer-experience @BitGo/devops
152+
/package.json @BitGo/sdk-reviewers
153+
**/package.json @BitGo/sdk-reviewers
153154
/tsconfig.json @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform @BitGo/developer-experience @BitGo/devops
154155
/tsconfig.packages.json @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform
155-
/yarn.lock @BitGo/coins @BitGo/web-experience @BitGo/wallet-platform @BitGo/developer-experience @BitGo/devops
156+
/yarn.lock @BitGo/sdk-reviewers
156157
/.iyarc @BitGo/wallet-platform @BitGo/hsm @BitGo/velocity
157158
flake.nix @BitGo/wallet-platform @BitGo/hsm @BitGo/developer-experience
158159
flake.lock @BitGo/wallet-platform @BitGo/hsm @BitGo/developer-experience

Dockerfile

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ COPY --from=builder /tmp/bitgo/modules/sdk-coin-icp /var/modules/sdk-coin-icp/
8888
COPY --from=builder /tmp/bitgo/modules/sdk-coin-initia /var/modules/sdk-coin-initia/
8989
COPY --from=builder /tmp/bitgo/modules/sdk-coin-injective /var/modules/sdk-coin-injective/
9090
COPY --from=builder /tmp/bitgo/modules/sdk-coin-islm /var/modules/sdk-coin-islm/
91-
COPY --from=builder /tmp/bitgo/modules/sdk-coin-mantra /var/modules/sdk-coin-mantra/
9291
COPY --from=builder /tmp/bitgo/modules/sdk-coin-mon /var/modules/sdk-coin-mon/
9392
COPY --from=builder /tmp/bitgo/modules/sdk-coin-near /var/modules/sdk-coin-near/
9493
COPY --from=builder /tmp/bitgo/modules/sdk-coin-oas /var/modules/sdk-coin-oas/
@@ -185,7 +184,6 @@ cd /var/modules/sdk-coin-icp && yarn link && \
185184
cd /var/modules/sdk-coin-initia && yarn link && \
186185
cd /var/modules/sdk-coin-injective && yarn link && \
187186
cd /var/modules/sdk-coin-islm && yarn link && \
188-
cd /var/modules/sdk-coin-mantra && yarn link && \
189187
cd /var/modules/sdk-coin-mon && yarn link && \
190188
cd /var/modules/sdk-coin-near && yarn link && \
191189
cd /var/modules/sdk-coin-oas && yarn link && \
@@ -285,7 +283,6 @@ RUN cd /var/bitgo-express && \
285283
yarn link @bitgo/sdk-coin-initia && \
286284
yarn link @bitgo/sdk-coin-injective && \
287285
yarn link @bitgo/sdk-coin-islm && \
288-
yarn link @bitgo/sdk-coin-mantra && \
289286
yarn link @bitgo/sdk-coin-mon && \
290287
yarn link @bitgo/sdk-coin-near && \
291288
yarn link @bitgo/sdk-coin-oas && \
@@ -333,14 +330,16 @@ RUN cd /var/bitgo-express && \
333330
yarn link @bitgo/sdk-coin-zec
334331
#LINK_END
335332

336-
#LABEL_START
337-
LABEL created="Thu, 04 Sep 2025 18:59:30 GMT"
338-
LABEL version=15.0.0
339-
LABEL git_hash=bbdf6e60b720b25e3212f3a4c5bdc81732a505e8
340-
#LABEL_END
333+
ARG BUILD_DATE
334+
ARG VERSION
335+
ARG GIT_HASH
336+
337+
LABEL created=${BUILD_DATE}
338+
LABEL version=${VERSION}
339+
LABEL git_hash=${GIT_HASH}
341340

342341
USER node
343-
ENV NODE_ENV production
344-
ENV BITGO_BIND 0.0.0.0
342+
ENV NODE_ENV=production
343+
ENV BITGO_BIND=0.0.0.0
345344
EXPOSE 3080
346345
ENTRYPOINT ["/usr/bin/tini", "--", "/usr/local/bin/node", "/var/bitgo-express/bin/bitgo-express"]

examples/ts/sol/stake-jito.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require('dotenv').config({ path: '../../.env' });
1616

1717
const AMOUNT_LAMPORTS = 1000;
1818
const JITO_STAKE_POOL_ADDRESS = 'Jito4APyf642JPZPx3hGc6WWJ8zPKtRbRs4P815Awbb';
19-
const NETWORK = 'devnet';
19+
const NETWORK = 'testnet';
2020

2121
const bitgo = new BitGoAPI({
2222
accessToken: process.env.TESTNET_ACCESS_TOKEN,

examples/ts/sol/unstake-jito.ts

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
/**
2+
* Unstakes JitoSOL tokens on Solana devnet.
3+
*
4+
* Copyright 2025, BitGo, Inc. All Rights Reserved.
5+
*/
6+
import { SolStakingTypeEnum } from '@bitgo/public-types';
7+
import { BitGoAPI } from '@bitgo/sdk-api';
8+
import { TransactionBuilderFactory, Tsol } from '@bitgo/sdk-coin-sol';
9+
import { coins } from '@bitgo/statics';
10+
import { Connection, PublicKey, clusterApiUrl, Keypair } from '@solana/web3.js';
11+
import { getStakePoolAccount } from '@solana/spl-stake-pool';
12+
import * as bs58 from 'bs58';
13+
14+
require('dotenv').config({ path: '../../.env' });
15+
16+
const AMOUNT_TOKENS = 100;
17+
const JITO_STAKE_POOL_ADDRESS = 'Jito4APyf642JPZPx3hGc6WWJ8zPKtRbRs4P815Awbb';
18+
const NETWORK = 'testnet';
19+
// You must find a validator. Try prepareWithdrawAccounts.
20+
21+
const bitgo = new BitGoAPI({
22+
accessToken: process.env.TESTNET_ACCESS_TOKEN,
23+
env: 'test',
24+
});
25+
const coin = coins.get('tsol');
26+
bitgo.register(coin.name, Tsol.createInstance);
27+
28+
async function main() {
29+
const account = getAccount();
30+
const { validatorAddress } = getValidator();
31+
const connection = new Connection(clusterApiUrl(NETWORK), 'confirmed');
32+
const recentBlockhash = await connection.getLatestBlockhash();
33+
const stakePoolAddress = new PublicKey(JITO_STAKE_POOL_ADDRESS);
34+
const stakePoolAccount = await getStakePoolAccount(connection, stakePoolAddress);
35+
console.info('Validator list account', stakePoolAccount.account.data.validatorList.toBase58());
36+
37+
const transferAuthority = Keypair.generate();
38+
const stakeAccount = Keypair.generate();
39+
console.info('Transfer authority public key:', transferAuthority.publicKey.toBase58());
40+
console.info('Stake account public key:', stakeAccount.publicKey.toBase58());
41+
42+
// Use BitGoAPI to build withdrawStake instruction
43+
const txBuilder = new TransactionBuilderFactory(coin).getStakingDeactivateBuilder();
44+
txBuilder
45+
.amount(`${AMOUNT_TOKENS}`)
46+
.sender(account.publicKey.toBase58())
47+
.stakingAddress(JITO_STAKE_POOL_ADDRESS)
48+
.unstakingAddress(stakeAccount.publicKey.toBase58())
49+
.stakingType(SolStakingTypeEnum.JITO)
50+
.extraParams({
51+
stakePoolData: {
52+
managerFeeAccount: stakePoolAccount.account.data.managerFeeAccount.toBase58(),
53+
poolMint: stakePoolAccount.account.data.poolMint.toBase58(),
54+
validatorListAccount: stakePoolAccount.account.data.validatorList.toBase58(),
55+
},
56+
validatorAddress,
57+
transferAuthorityAddress: transferAuthority.publicKey.toBase58(),
58+
})
59+
.nonce(recentBlockhash.blockhash);
60+
61+
txBuilder.sign({ key: account.secretKey });
62+
txBuilder.sign({ key: bs58.encode(stakeAccount.secretKey) });
63+
txBuilder.sign({ key: bs58.encode(transferAuthority.secretKey) });
64+
65+
const tx = await txBuilder.build();
66+
const serializedTx = tx.toBroadcastFormat();
67+
console.info(serializedTx);
68+
console.info(`Transaction JSON:\n${JSON.stringify(tx.toJson(), undefined, 2)}`);
69+
70+
// Send transaction
71+
try {
72+
const sig = await connection.sendRawTransaction(Buffer.from(serializedTx, 'base64'));
73+
await connection.confirmTransaction(sig);
74+
console.log(`${AMOUNT_TOKENS} tokens withdrawn`, sig);
75+
} catch (e) {
76+
console.log('Error sending transaction');
77+
console.error(e);
78+
}
79+
}
80+
81+
const getAccount = () => {
82+
const publicKey = process.env.ACCOUNT_PUBLIC_KEY;
83+
const secretKey = process.env.ACCOUNT_SECRET_KEY;
84+
if (publicKey === undefined || secretKey === undefined) {
85+
const { publicKey, secretKey } = Keypair.generate();
86+
console.log('# Here is a new account to save into your .env file.');
87+
console.log(`ACCOUNT_PUBLIC_KEY=${publicKey.toBase58()}`);
88+
console.log(`ACCOUNT_SECRET_KEY=${bs58.encode(secretKey)}`);
89+
throw new Error('Missing account information');
90+
}
91+
92+
return {
93+
publicKey: new PublicKey(publicKey),
94+
secretKey,
95+
secretKeyArray: new Uint8Array(bs58.decode(secretKey)),
96+
};
97+
};
98+
99+
const getValidator = () => {
100+
const validatorAddress = process.env.VALIDATOR_PUBLIC_KEY;
101+
if (validatorAddress === undefined) {
102+
console.log('# You must select a validator, then define the entry below');
103+
console.log('VALIDATOR_PUBLIC_KEY=');
104+
throw new Error('Missing validator address');
105+
}
106+
return { validatorAddress };
107+
};
108+
109+
main().catch((e) => console.error(e));

modules/abstract-cosmos/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@
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.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-09-25)
7+
8+
### Features
9+
10+
- configure learn to skip git operations ([ee3a622](https://github.com/BitGo/BitGoJS/commit/ee3a6220496476aa7f4545b5f4a9a3bf97d9bdb9))
11+
612
## [11.14.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/[email protected]...@bitgo/[email protected]) (2025-09-03)
713

814
### Bug Fixes

modules/abstract-cosmos/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bitgo/abstract-cosmos",
3-
"version": "11.14.2",
3+
"version": "11.15.0",
44
"description": "BitGo SDK coin library for COSMOS base implementation",
55
"main": "./dist/src/index.js",
66
"types": "./dist/src/index.d.ts",
@@ -38,10 +38,10 @@
3838
]
3939
},
4040
"dependencies": {
41-
"@bitgo/sdk-core": "^36.8.0",
41+
"@bitgo/sdk-core": "^36.9.0",
4242
"@bitgo/sdk-lib-mpc": "^10.7.0",
4343
"@bitgo/secp256k1": "^1.5.0",
44-
"@bitgo/statics": "^57.8.0",
44+
"@bitgo/statics": "^58.0.0",
4545
"@cosmjs/amino": "^0.29.5",
4646
"@cosmjs/crypto": "^0.30.1",
4747
"@cosmjs/encoding": "^0.29.5",

0 commit comments

Comments
 (0)