Skip to content
Closed
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
7 changes: 7 additions & 0 deletions modules/sdk-core/src/bitgo/bitcoin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import { BIP32Interface, ECPairInterface } from '@bitgo/utxo-lib';
import * as common from '../common';
import { V1Network } from './types';

/**
* Returns the utxo-lib network object for the given V1 network name.
* If no network is provided, falls back to the globally configured network.
*
* @param {V1Network} [network] - The V1 network name ('bitcoin' or 'testnet'). Defaults to the current global network.
* @returns {utxolib.Network} The utxo-lib network parameters object.
*/
export function getNetwork(network?: V1Network): utxolib.Network {
network = network || common.getNetwork();
return utxolib.networks[network];
Expand Down
Loading