File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * List wallets by wallet IDs at BitGo.
3+ * Doc: https://developers.bitgo.com/api/v2.wallet.list
4+ *
5+ * This tool will help you see how to use the BitGo API to easily list your
6+ * BitGo wallets.
7+ *
8+ * Copyright 2025, BitGo, Inc. All Rights Reserved.
9+ */
10+ import { BitGoAPI } from '@bitgo/sdk-api' ;
11+ require ( 'dotenv' ) . config ( { path : '../../.env' } ) ;
12+
13+ const bitgo = new BitGoAPI ( {
14+ accessToken : process . env . TESTNET_ACCESS_TOKEN ,
15+ env : 'test' ,
16+ } ) ;
17+
18+ async function main ( ) {
19+ const body = await bitgo . get ( bitgo . url ( '/wallets' , 2 ) ) . query ( {
20+ id : [ ] , // Replace with your wallet IDs
21+ } ) . result ( ) ;
22+
23+ console . log ( `${ JSON . stringify ( body . wallets , null , 2 ) } ` ) ;
24+ }
25+
26+ main ( ) . catch ( ( e ) => console . error ( e ) ) ;
You can’t perform that action at this time.
0 commit comments