MCPcopy Create free account
hub / github.com/bitpay/bitcore / constructor

Method constructor

packages/bitcore-cli/src/wallet.ts:72–87  ·  view source on GitHub ↗
(args: {
    name: string;
    dir: string;
    verbose?: boolean;
    host?: string;
    walletId?: string;
  })

Source from the content-addressed store, hash-verified

70 }
71
72 constructor(args: {
73 name: string;
74 dir: string;
75 verbose?: boolean;
76 host?: string;
77 walletId?: string;
78 }) {
79 const { name, dir, verbose, host, walletId } = args || {};
80 this.name = name;
81 this.dir = dir;
82 this.filename = Utils.getWalletFileName(name, dir);
83 this.storage = new FileStorage({ filename: this.filename });
84 this.host = host || 'https://bws.bitpay.com/';
85 this.walletId = walletId;
86 Wallet.setVerbose(verbose);
87 }
88
89 static setVerbose(v: boolean) {
90 _verbose = !!v;

Callers

nothing calls this directly

Calls 2

getWalletFileNameMethod · 0.80
setVerboseMethod · 0.45

Tested by

no test coverage detected