-
Notifications
You must be signed in to change notification settings - Fork 302
Expand file tree
/
Copy pathindex.ts
More file actions
65 lines (54 loc) · 1.36 KB
/
index.ts
File metadata and controls
65 lines (54 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/**
* @prettier
*/
/**
* Main entry point for the BitGo SDK.
*
* This module re-exports the core BitGo functionality including authentication,
* wallet management, coin implementations, and cryptographic utilities.
*
* @module bitgo
*/
//
// Copyright 2022, BitGo, Inc. All Rights Reserved.
//
import * as _ from 'lodash';
import { common } from '@bitgo/sdk-core';
export * from '@bitgo/sdk-api';
import * as utxolib from '@bitgo/utxo-lib';
import { GlobalCoinFactory } from './v2/coinFactory';
export * from './bitgo';
// Expose legacy "bitcoin" API (mostly HDNode)
/** @deprecated */
export { bitcoin } from '@bitgo/sdk-core';
/** @deprecated */
export const sjcl = require('@bitgo/sjcl');
export { Buffer } from 'buffer';
export const Environments = _.cloneDeep(common.Environments);
export * from '@bitgo/sdk-core';
export { GlobalCoinFactory };
export * from './v2';
/**
* Set the network, i.e. either "bitcoin" for production with real bitcoin, or
* "testnet" for development with testnet bitcoin.
*
* @deprecated
*/
export function setNetwork(network) {
common.setNetwork(network);
}
/**
* Get the network. Returns either "bitcoin" or "testnet".
*
* @deprecated
*/
export function getNetwork() {
return common.getNetwork();
}
/**
* @deprecated
*/
export function getNetworkObj() {
return utxolib.networks[common.getNetwork()];
}
setNetwork('testnet');