PHP WebShell

Текущая директория: /opt/BitGoJS/examples/js

Просмотр файла: list-wallets.js

/**
 * List all multi-sig wallets at BitGo for the given coin.
 * This makes use of the convenience function wallets().list()
 *
 * This tool will help you see how to use the BitGo API to easily list your
 * BitGo wallets.
 *
 * Copyright 2022, BitGo, Inc.  All Rights Reserved.
 */

const BitGoJS = require('bitgo');
const bitgo = new BitGoJS.BitGo({ env: 'test' });
const Promise = require('bluebird');

// TODO: set your access token here
const accessToken = null;

const coin = 'tltc';

Promise.coroutine(function* () {
  bitgo.authenticateWithAccessToken({ accessToken });

  const wallets = yield bitgo.coin(coin).wallets().list({});

  for (const wallet of wallets.wallets) {
    console.log(`Wallet label: ${wallet.label()}`);
    console.log(`Wallet ID: ${wallet.id()}`);
  }
})();

Выполнить команду


Для локальной разработки. Не используйте в интернете!