bitcoind-rpc
Advanced tools
Comparing version 0.8.1 to 0.9.0
131
lib/index.js
@@ -42,2 +42,8 @@ 'use strict'; | ||
var userInfo = this.user + ':' + this.pass; | ||
var buf = Buffer.from && Buffer.from !== Uint8Array.from | ||
? Buffer.from(userInfo) | ||
: new Buffer(userInfo); | ||
this.auth = buf.toString('base64'); | ||
var isRejectUnauthorized = typeof opts.rejectUnauthorized !== 'undefined'; | ||
@@ -72,3 +78,2 @@ this.rejectUnauthorized = isRejectUnauthorized ? opts.rejectUnauthorized : true; | ||
request = JSON.stringify(request); | ||
var auth = new Buffer(self.user + ':' + self.pass).toString('base64'); | ||
@@ -150,3 +155,3 @@ var options = { | ||
req.setHeader('Content-Type', 'application/json'); | ||
req.setHeader('Authorization', 'Basic ' + auth); | ||
req.setHeader('Authorization', 'Basic ' + self.auth); | ||
req.write(request); | ||
@@ -165,76 +170,139 @@ req.end(); | ||
abandonTransaction: 'str', | ||
abortRescan: '', | ||
addMultiSigAddress: '', | ||
addNode: '', | ||
analyzePSBT: 'str', | ||
backupWallet: '', | ||
bumpFee: 'str', | ||
clearBanned: '', | ||
combinePSBT: 'obj', | ||
combineRawTransaction: 'obj', | ||
convertToPSBT: 'str', | ||
createMultiSig: '', | ||
createPSBT: 'obj', | ||
createRawTransaction: 'obj obj', | ||
createWallet: 'str', | ||
decodePSBT: 'str', | ||
decodeScript: 'str', | ||
decodeRawTransaction: '', | ||
deriveAddresses: 'str', | ||
disconnectNode: '', | ||
dumpPrivKey: '', | ||
dumpWallet: 'str', | ||
encryptWallet: '', | ||
estimateFee: '', | ||
enumerateSigners: '', | ||
estimateFee: '', // deprecated | ||
estimateSmartFee: 'int str', | ||
estimatePriority: 'int', | ||
generate: 'int', | ||
estimatePriority: 'int', // deprecated | ||
generate: 'int', // deprecated | ||
generateBlock: 'str obj', | ||
generateToAddress: 'int str', | ||
getAccount: '', | ||
getAccountAddress: 'str', | ||
generateToDescriptor: 'int str', | ||
getAccount: '', // deprecated | ||
getAccountAddress: 'str', // deprecated | ||
getAddedNodeInfo: '', | ||
getAddressMempool: 'obj', | ||
getAddressUtxos: 'obj', | ||
getAddressBalance: 'obj', | ||
getAddressDeltas: 'obj', | ||
getAddressTxids: 'obj', | ||
getAddressesByAccount: '', | ||
getAddressMempool: 'obj', // deprecated | ||
getAddressUtxos: 'obj', // deprecated | ||
getAddressBalance: 'obj', // deprecated | ||
getAddressDeltas: 'obj', // deprecated | ||
getAddressesByLabel: 'str', | ||
getAddressInfo: 'str', | ||
getAddressTxids: 'obj', // deprecated | ||
getAddressesByAccount: '', // deprecated | ||
getBalance: 'str int', | ||
getBalances: '', | ||
getBestBlockHash: '', | ||
getBlockDeltas: 'str', | ||
getBlockDeltas: 'str', // deprecated | ||
getBlock: 'str int', | ||
getBlockchainInfo: '', | ||
getBlockCount: '', | ||
getBlockHashes: 'int int obj', | ||
getBlockFilter: 'str', | ||
getBlockHashes: 'int int obj', // deprecated | ||
getBlockHash: 'int', | ||
getBlockHeader: 'str', | ||
getBlockNumber: '', | ||
getBlockNumber: '', // deprecated | ||
getBlockStats: 'str', | ||
getBlockTemplate: '', | ||
getConnectionCount: '', | ||
getChainTips: '', | ||
getChainTxStats: '', | ||
getDescriptorInfo: 'str', | ||
getDifficulty: '', | ||
getGenerate: '', | ||
getHashesPerSec: '', | ||
getInfo: '', | ||
getMemoryPool: '', | ||
getGenerate: '', // deprecated | ||
getHashesPerSec: '', // deprecated | ||
getIndexInfo: '', | ||
getInfo: '', // deprecated | ||
getMemoryInfo: '', | ||
getMemoryPool: '', // deprecated | ||
getMemPoolAncestors: 'str', | ||
getMemPoolDescendants: 'str', | ||
getMemPoolEntry: 'str', | ||
getMemPoolInfo: '', | ||
getMiningInfo: '', | ||
getNetTotals: '', | ||
getNetworkHashPS: '', | ||
getNetworkInfo: '', | ||
getNewAddress: '', | ||
getNewAddress: 'str str', | ||
getNodeAddresses: '', | ||
getPeerInfo: '', | ||
getRawChangeAddress: '', | ||
getRawMemPool: 'bool', | ||
getRawTransaction: 'str int', | ||
getReceivedByAccount: 'str int', | ||
getReceivedByAccount: 'str int', // deprecated | ||
getReceivedByAddress: 'str int', | ||
getReceivedByLabel: 'str', | ||
getRpcInfo: '', | ||
getSpentInfo: 'obj', | ||
getTransaction: '', | ||
getTxOut: 'str int bool', | ||
getTxOutProof: '', | ||
getTxOutSetInfo: '', | ||
getUnconfirmedBalance: '', | ||
getWalletInfo: '', | ||
getWork: '', | ||
getZmqNotifications: '', | ||
finalizePSBT: 'str', | ||
fundRawTransaction: 'str', | ||
help: '', | ||
importAddress: 'str str bool', | ||
importDescriptors: 'str', | ||
importMulti: 'obj obj', | ||
importPrivKey: 'str str bool', | ||
importPrunedFunds: 'str, str', | ||
importPubKey: 'str', | ||
importWallet: 'str', | ||
invalidateBlock: 'str', | ||
joinPSBTs: 'obj', | ||
keyPoolRefill: '', | ||
listAccounts: 'int', | ||
listAddressGroupings: '', | ||
listBanned: '', | ||
listDescriptors: '', | ||
listLabels: '', | ||
listLockUnspent: 'bool', | ||
listReceivedByAccount: 'int bool', | ||
listReceivedByAddress: 'int bool', | ||
listReceivedByLabel: '', | ||
listSinceBlock: 'str int', | ||
listTransactions: 'str int int', | ||
listUnspent: 'int int', | ||
listLockUnspent: 'bool', | ||
listWalletDir: '', | ||
listWallets: '', | ||
loadWallet: 'str', | ||
lockUnspent: '', | ||
logging: '', | ||
move: 'str str float int str', | ||
ping: '', | ||
preciousBlock: 'str', | ||
prioritiseTransaction: 'str float int', | ||
pruneBlockChain: 'int', | ||
psbtBumpFee: 'str', | ||
removePrunedFunds: 'str', | ||
reScanBlockChain: '', | ||
saveMemPool: '', | ||
send: 'obj', | ||
setHDSeed: '', | ||
setLabel: 'str str', | ||
setWalletFlag: 'str', | ||
scanTxOutSet: 'str', | ||
sendFrom: 'str str float int str str', | ||
@@ -245,14 +313,29 @@ sendMany: 'str obj int str', //not sure this is will work | ||
setAccount: '', | ||
setBan: 'str str', | ||
setNetworkActive: 'bool', | ||
setGenerate: 'bool int', | ||
setTxFee: 'float', | ||
signMessage: '', | ||
signMessageWithPrivKey: 'str str', | ||
signRawTransaction: '', | ||
signRawTransactionWithKey: 'str obj', | ||
signRawTransactionWithWallet: 'str', | ||
stop: '', | ||
submitBlock: '', | ||
submitBlock: 'str', | ||
submitHeader: 'str', | ||
testMemPoolAccept: 'obj', | ||
unloadWallet: '', | ||
upgradeWallet: '', | ||
uptime: '', | ||
utxoUpdatePSBT: 'str', | ||
validateAddress: '', | ||
verifyChain: '', | ||
verifyMessage: '', | ||
verifyTxOutProof: 'str', | ||
walletCreateFundedPSBT: '', | ||
walletDisplayAddress: 'str', | ||
walletLock: '', | ||
walletPassPhrase: 'string int', | ||
walletPassphraseChange: '', | ||
walletProcessPSBT: 'str' | ||
}; | ||
@@ -259,0 +342,0 @@ |
{ | ||
"name": "bitcoind-rpc", | ||
"description": "Bitcoin Client Library to connect to Bitcoin Core via RPC", | ||
"version": "0.8.1", | ||
"version": "0.9.0", | ||
"author": { | ||
@@ -6,0 +6,0 @@ "name": "Stephen Pair", |
29017
832