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

Method asyncCall

packages/bitcore-node/src/rpc.ts:51–60  ·  view source on GitHub ↗
(method: string, params: any[], walletName?: string)

Source from the content-addressed store, hash-verified

49 }
50
51 async asyncCall<T>(method: string, params: any[], walletName?: string) {
52 return new Promise<T>((resolve, reject) => {
53 this.callMethod(method, params, (err, data) => {
54 if (err) {
55 return reject(err);
56 }
57 return resolve(data);
58 }, walletName);
59 });
60 }
61
62 async getChainTip() {
63 const tips = await this.asyncCall<{

Callers 11

getBestBlockHashMethod · 0.95
getBlockHeightMethod · 0.95
getBlockMethod · 0.95
getBlockHashMethod · 0.95
getTransactionMethod · 0.95
sendTransactionMethod · 0.95
decodeScriptMethod · 0.95
getWalletAddressesMethod · 0.95
getEstimateSmartFeeMethod · 0.95
getEstimateFeeMethod · 0.95
mainFunction · 0.45

Calls 1

callMethodMethod · 0.95

Tested by

no test coverage detected