beignet 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintignore +4 -0
- package/.eslintrc +40 -0
- package/.prettierrc +9 -0
- package/LICENSE +21 -0
- package/README.md +166 -0
- package/dist/electrum/constants.js +31 -0
- package/dist/electrum/constants.js.map +1 -0
- package/dist/electrum/index.js +552 -0
- package/dist/electrum/index.js.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/shapes/electrum.js +14 -0
- package/dist/shapes/electrum.js.map +1 -0
- package/dist/shapes/index.js +19 -0
- package/dist/shapes/index.js.map +1 -0
- package/dist/shapes/wallet.js +115 -0
- package/dist/shapes/wallet.js.map +1 -0
- package/dist/transaction/index.js +692 -0
- package/dist/transaction/index.js.map +1 -0
- package/dist/types/electrum/constants.d.ts +7 -0
- package/dist/types/electrum/index.d.ts +85 -0
- package/dist/types/electrum.js +9 -0
- package/dist/types/electrum.js.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.js +20 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/shapes/electrum.d.ts +5 -0
- package/dist/types/shapes/index.d.ts +2 -0
- package/dist/types/shapes/wallet.d.ts +10 -0
- package/dist/types/transaction/index.d.ts +92 -0
- package/dist/types/transaction.js +12 -0
- package/dist/types/transaction.js.map +1 -0
- package/dist/types/types/electrum.d.ts +113 -0
- package/dist/types/types/index.d.ts +3 -0
- package/dist/types/types/transaction.d.ts +51 -0
- package/dist/types/types/wallet.d.ts +400 -0
- package/dist/types/utils/conversion.d.ts +10 -0
- package/dist/types/utils/derivation-path.d.ts +19 -0
- package/dist/types/utils/electrum.d.ts +10 -0
- package/dist/types/utils/exchange-rate.d.ts +30 -0
- package/dist/types/utils/helpers.d.ts +23 -0
- package/dist/types/utils/index.d.ts +7 -0
- package/dist/types/utils/result.d.ts +16 -0
- package/dist/types/utils/transaction.d.ts +21 -0
- package/dist/types/utils/wallet.d.ts +47 -0
- package/dist/types/wallet/constants.d.ts +12 -0
- package/dist/types/wallet/index.d.ts +214 -0
- package/dist/types/wallet.js +36 -0
- package/dist/types/wallet.js.map +1 -0
- package/dist/utils/conversion.js +52 -0
- package/dist/utils/conversion.js.map +1 -0
- package/dist/utils/derivation-path.js +104 -0
- package/dist/utils/derivation-path.js.map +1 -0
- package/dist/utils/electrum.js +149 -0
- package/dist/utils/electrum.js.map +1 -0
- package/dist/utils/exchange-rate.js +49 -0
- package/dist/utils/exchange-rate.js.map +1 -0
- package/dist/utils/helpers.js +137 -0
- package/dist/utils/helpers.js.map +1 -0
- package/dist/utils/index.js +24 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/result.js +36 -0
- package/dist/utils/result.js.map +1 -0
- package/dist/utils/transaction.js +327 -0
- package/dist/utils/transaction.js.map +1 -0
- package/dist/utils/wallet.js +227 -0
- package/dist/utils/wallet.js.map +1 -0
- package/dist/wallet/constants.js +15 -0
- package/dist/wallet/constants.js.map +1 -0
- package/dist/wallet/index.js +2113 -0
- package/dist/wallet/index.js.map +1 -0
- package/docs/html/.nojekyll +1 -0
- package/docs/html/assets/highlight.css +22 -0
- package/docs/html/assets/main.js +58 -0
- package/docs/html/assets/search.js +1 -0
- package/docs/html/assets/style.css +1367 -0
- package/docs/html/classes/Electrum.html +812 -0
- package/docs/html/classes/Transaction.html +687 -0
- package/docs/html/classes/Wallet.html +2030 -0
- package/docs/html/enums/EAddressType.html +227 -0
- package/docs/html/enums/EAvailableNetworks.html +255 -0
- package/docs/html/enums/EBoostType.html +220 -0
- package/docs/html/enums/EFeeId.html +241 -0
- package/docs/html/enums/EPaymentType.html +220 -0
- package/docs/html/enums/EProtocol.html +220 -0
- package/docs/html/enums/EUnit.html +227 -0
- package/docs/html/functions/availableNetworks.html +200 -0
- package/docs/html/functions/constructByteCountParam.html +210 -0
- package/docs/html/functions/decodeOpReturnMessage.html +202 -0
- package/docs/html/functions/decodeRawTransaction.html +210 -0
- package/docs/html/functions/err.html +214 -0
- package/docs/html/functions/formatKeyDerivationPath.html +219 -0
- package/docs/html/functions/formatPeerData.html +207 -0
- package/docs/html/functions/generateMnemonic.html +223 -0
- package/docs/html/functions/generateWalletId.html +202 -0
- package/docs/html/functions/getAddressFromScriptPubKey.html +209 -0
- package/docs/html/functions/getAddressTypeFromPath.html +206 -0
- package/docs/html/functions/getByteCount.html +206 -0
- package/docs/html/functions/getDataFallback.html +207 -0
- package/docs/html/functions/getDefaultPort.html +209 -0
- package/docs/html/functions/getDefaultWalletData.html +200 -0
- package/docs/html/functions/getDefaultWalletDataKeys.html +200 -0
- package/docs/html/functions/getExchangeRates.html +200 -0
- package/docs/html/functions/getHighestUsedIndexFromTxHashes.html +216 -0
- package/docs/html/functions/getKeyDerivationPath.html +211 -0
- package/docs/html/functions/getKeyDerivationPathObject.html +216 -0
- package/docs/html/functions/getKeyDerivationPathString.html +220 -0
- package/docs/html/functions/getKeyValue.html +206 -0
- package/docs/html/functions/getPeers.html +211 -0
- package/docs/html/functions/getProtocolForPort.html +209 -0
- package/docs/html/functions/getScriptHash.html +210 -0
- package/docs/html/functions/getSeed.html +209 -0
- package/docs/html/functions/getSeedHash.html +206 -0
- package/docs/html/functions/getSha256.html +206 -0
- package/docs/html/functions/getStorageKeyValues.html +209 -0
- package/docs/html/functions/getTxFee.html +210 -0
- package/docs/html/functions/getWalletDataStorageKey.html +206 -0
- package/docs/html/functions/isValidBech32mEncodedString.html +211 -0
- package/docs/html/functions/objectKeys-1.html +211 -0
- package/docs/html/functions/objectsMatch.html +210 -0
- package/docs/html/functions/ok.html +214 -0
- package/docs/html/functions/parseOnChainPaymentRequest.html +204 -0
- package/docs/html/functions/reduceValue.html +215 -0
- package/docs/html/functions/removeDustOutputs.html +206 -0
- package/docs/html/functions/setReplaceByFee.html +210 -0
- package/docs/html/functions/shuffleArray.html +211 -0
- package/docs/html/functions/validateAddress.html +216 -0
- package/docs/html/functions/validateMnemonic.html +206 -0
- package/docs/html/functions/validateTransaction.html +206 -0
- package/docs/html/index.html +360 -0
- package/docs/html/interfaces/IAddInput.html +231 -0
- package/docs/html/interfaces/IAddress.html +247 -0
- package/docs/html/interfaces/IAddressData.html +231 -0
- package/docs/html/interfaces/IAddressType.html +199 -0
- package/docs/html/interfaces/IAddressTypeData.html +252 -0
- package/docs/html/interfaces/IAddresses.html +199 -0
- package/docs/html/interfaces/IBoostedTransaction.html +238 -0
- package/docs/html/interfaces/IBoostedTransactions.html +199 -0
- package/docs/html/interfaces/ICreateTransaction.html +224 -0
- package/docs/html/interfaces/ICustomGetAddress.html +231 -0
- package/docs/html/interfaces/ICustomGetScriptHash.html +224 -0
- package/docs/html/interfaces/IElectrumGetAddressBalanceRes.html +235 -0
- package/docs/html/interfaces/IExchangeRates.html +210 -0
- package/docs/html/interfaces/IFormattedPeerData.html +245 -0
- package/docs/html/interfaces/IFormattedTransaction.html +343 -0
- package/docs/html/interfaces/IFormattedTransactions.html +199 -0
- package/docs/html/interfaces/IGenerateAddresses.html +252 -0
- package/docs/html/interfaces/IGenerateAddressesResponse.html +224 -0
- package/docs/html/interfaces/IGetAddress.html +231 -0
- package/docs/html/interfaces/IGetAddressBalanceRes.html +226 -0
- package/docs/html/interfaces/IGetAddressByPath.html +224 -0
- package/docs/html/interfaces/IGetAddressHistoryResponse.html +269 -0
- package/docs/html/interfaces/IGetAddressResponse.html +231 -0
- package/docs/html/interfaces/IGetAddressScriptHashesHistoryResponse.html +245 -0
- package/docs/html/interfaces/IGetDerivationPath.html +259 -0
- package/docs/html/interfaces/IGetFeeEstimatesResponse.html +238 -0
- package/docs/html/interfaces/IGetHeaderResponse.html +245 -0
- package/docs/html/interfaces/IGetNextAvailableAddressResponse.html +238 -0
- package/docs/html/interfaces/IGetTransactions.html +245 -0
- package/docs/html/interfaces/IGetTransactionsFromInputs.html +245 -0
- package/docs/html/interfaces/IGetUtxosResponse.html +224 -0
- package/docs/html/interfaces/IHeader.html +231 -0
- package/docs/html/interfaces/IIndexes.html +238 -0
- package/docs/html/interfaces/IKeyDerivationPath.html +247 -0
- package/docs/html/interfaces/IKeyDerivationPathData.html +224 -0
- package/docs/html/interfaces/INewBlock.html +224 -0
- package/docs/html/interfaces/IOnchainFees.html +245 -0
- package/docs/html/interfaces/IOutput.html +231 -0
- package/docs/html/interfaces/IPeerData.html +231 -0
- package/docs/html/interfaces/IRbfData.html +252 -0
- package/docs/html/interfaces/ISend.html +224 -0
- package/docs/html/interfaces/ISendTransaction.html +322 -0
- package/docs/html/interfaces/ISendTx.html +231 -0
- package/docs/html/interfaces/ISetupTransaction.html +238 -0
- package/docs/html/interfaces/ISubscribeToAddress.html +247 -0
- package/docs/html/interfaces/ISubscribeToHeader.html +245 -0
- package/docs/html/interfaces/ITargets.html +238 -0
- package/docs/html/interfaces/ITransaction.html +281 -0
- package/docs/html/interfaces/ITxHash.html +217 -0
- package/docs/html/interfaces/ITxHashes.html +235 -0
- package/docs/html/interfaces/IUtxo.html +275 -0
- package/docs/html/interfaces/IVin.html +252 -0
- package/docs/html/interfaces/IVout.html +246 -0
- package/docs/html/interfaces/IWallet.html +350 -0
- package/docs/html/interfaces/IWalletData.html +343 -0
- package/docs/html/types/ElectrumConnectionPubSub.html +233 -0
- package/docs/html/types/ElectrumConnectionSubscription.html +204 -0
- package/docs/html/types/InputData.html +203 -0
- package/docs/html/types/ObjectKeys.html +198 -0
- package/docs/html/types/Result.html +201 -0
- package/docs/html/types/TAddressIndexInfo.html +204 -0
- package/docs/html/types/TAddressLabel.html +193 -0
- package/docs/html/types/TAddressType.html +193 -0
- package/docs/html/types/TAddressTypeContent.html +198 -0
- package/docs/html/types/TAddressTypes.html +193 -0
- package/docs/html/types/TAvailableNetworks.html +193 -0
- package/docs/html/types/TConnectToElectrumRes.html +193 -0
- package/docs/html/types/TDecodeRawTx.html +214 -0
- package/docs/html/types/TElectrumNetworks.html +193 -0
- package/docs/html/types/TGetAddressHistory.html +200 -0
- package/docs/html/types/TGetByteCountInput.html +193 -0
- package/docs/html/types/TGetByteCountInputs.html +193 -0
- package/docs/html/types/TGetByteCountOutput.html +193 -0
- package/docs/html/types/TGetByteCountOutputs.html +193 -0
- package/docs/html/types/TGetData.html +211 -0
- package/docs/html/types/TGetTotalFeeObj.html +204 -0
- package/docs/html/types/TKeyDerivationAccount.html +193 -0
- package/docs/html/types/TKeyDerivationChange.html +193 -0
- package/docs/html/types/TKeyDerivationCoinType.html +193 -0
- package/docs/html/types/TKeyDerivationIndex.html +193 -0
- package/docs/html/types/TKeyDerivationPurpose.html +193 -0
- package/docs/html/types/TMessageDataMap.html +210 -0
- package/docs/html/types/TMessageKeys.html +193 -0
- package/docs/html/types/TOnMessage.html +213 -0
- package/docs/html/types/TProcessUnconfirmedTransactions.html +202 -0
- package/docs/html/types/TProtocol.html +193 -0
- package/docs/html/types/TServer.html +204 -0
- package/docs/html/types/TSetData.html +213 -0
- package/docs/html/types/TSetupTransactionResponse.html +193 -0
- package/docs/html/types/TStorage.html +200 -0
- package/docs/html/types/TSubscribedReceive.html +193 -0
- package/docs/html/types/TTransactionMessage.html +198 -0
- package/docs/html/types/TTxResponse.html +206 -0
- package/docs/html/types/TTxResult.html +200 -0
- package/docs/html/types/TUnspentAddressScriptHashData.html +198 -0
- package/docs/html/types/TWalletDataKeys.html +193 -0
- package/docs/html/variables/defaultElectrumPorts.html +193 -0
- package/docs/html/variables/electrumConnection.html +199 -0
- package/docs/html/variables/mostUsedExchangeTickers.html +241 -0
- package/docs/markdown/.nojekyll +1 -0
- package/docs/markdown/README.md +1875 -0
- package/docs/markdown/classes/Electrum.md +718 -0
- package/docs/markdown/classes/Transaction.md +536 -0
- package/docs/markdown/classes/Wallet.md +2189 -0
- package/docs/markdown/enums/EAddressType.md +41 -0
- package/docs/markdown/enums/EAvailableNetworks.md +85 -0
- package/docs/markdown/enums/EBoostType.md +30 -0
- package/docs/markdown/enums/EFeeId.md +63 -0
- package/docs/markdown/enums/EPaymentType.md +30 -0
- package/docs/markdown/enums/EProtocol.md +30 -0
- package/docs/markdown/enums/EUnit.md +41 -0
- package/docs/markdown/interfaces/IAddInput.md +41 -0
- package/docs/markdown/interfaces/IAddress.md +69 -0
- package/docs/markdown/interfaces/IAddressData.md +41 -0
- package/docs/markdown/interfaces/IAddressType.md +7 -0
- package/docs/markdown/interfaces/IAddressTypeData.md +74 -0
- package/docs/markdown/interfaces/IAddresses.md +7 -0
- package/docs/markdown/interfaces/IBoostedTransaction.md +52 -0
- package/docs/markdown/interfaces/IBoostedTransactions.md +7 -0
- package/docs/markdown/interfaces/ICreateTransaction.md +30 -0
- package/docs/markdown/interfaces/ICustomGetAddress.md +41 -0
- package/docs/markdown/interfaces/ICustomGetScriptHash.md +30 -0
- package/docs/markdown/interfaces/IElectrumGetAddressBalanceRes.md +55 -0
- package/docs/markdown/interfaces/IExchangeRates.md +7 -0
- package/docs/markdown/interfaces/IFormattedPeerData.md +63 -0
- package/docs/markdown/interfaces/IFormattedTransaction.md +217 -0
- package/docs/markdown/interfaces/IFormattedTransactions.md +7 -0
- package/docs/markdown/interfaces/IGenerateAddresses.md +74 -0
- package/docs/markdown/interfaces/IGenerateAddressesResponse.md +30 -0
- package/docs/markdown/interfaces/IGetAddress.md +41 -0
- package/docs/markdown/interfaces/IGetAddressBalanceRes.md +36 -0
- package/docs/markdown/interfaces/IGetAddressByPath.md +30 -0
- package/docs/markdown/interfaces/IGetAddressHistoryResponse.md +121 -0
- package/docs/markdown/interfaces/IGetAddressResponse.md +41 -0
- package/docs/markdown/interfaces/IGetAddressScriptHashesHistoryResponse.md +63 -0
- package/docs/markdown/interfaces/IGetDerivationPath.md +100 -0
- package/docs/markdown/interfaces/IGetFeeEstimatesResponse.md +52 -0
- package/docs/markdown/interfaces/IGetHeaderResponse.md +63 -0
- package/docs/markdown/interfaces/IGetNextAvailableAddressResponse.md +52 -0
- package/docs/markdown/interfaces/IGetTransactions.md +63 -0
- package/docs/markdown/interfaces/IGetTransactionsFromInputs.md +63 -0
- package/docs/markdown/interfaces/IGetUtxosResponse.md +30 -0
- package/docs/markdown/interfaces/IHeader.md +41 -0
- package/docs/markdown/interfaces/IIndexes.md +52 -0
- package/docs/markdown/interfaces/IKeyDerivationPath.md +69 -0
- package/docs/markdown/interfaces/IKeyDerivationPathData.md +30 -0
- package/docs/markdown/interfaces/INewBlock.md +30 -0
- package/docs/markdown/interfaces/IOnchainFees.md +63 -0
- package/docs/markdown/interfaces/IOutput.md +41 -0
- package/docs/markdown/interfaces/IPeerData.md +41 -0
- package/docs/markdown/interfaces/IRbfData.md +74 -0
- package/docs/markdown/interfaces/ISend.md +30 -0
- package/docs/markdown/interfaces/ISendTransaction.md +184 -0
- package/docs/markdown/interfaces/ISendTx.md +41 -0
- package/docs/markdown/interfaces/ISetupTransaction.md +52 -0
- package/docs/markdown/interfaces/ISubscribeToAddress.md +60 -0
- package/docs/markdown/interfaces/ISubscribeToHeader.md +59 -0
- package/docs/markdown/interfaces/ITargets.md +52 -0
- package/docs/markdown/interfaces/ITransaction.md +88 -0
- package/docs/markdown/interfaces/ITxHash.md +19 -0
- package/docs/markdown/interfaces/ITxHashes.md +55 -0
- package/docs/markdown/interfaces/IUtxo.md +112 -0
- package/docs/markdown/interfaces/IVin.md +70 -0
- package/docs/markdown/interfaces/IVout.md +52 -0
- package/docs/markdown/interfaces/IWallet.md +209 -0
- package/docs/markdown/interfaces/IWalletData.md +217 -0
- package/example/helpers.ts +76 -0
- package/example/index.ts +77 -0
- package/package.json +69 -0
- package/src/electrum/constants.ts +28 -0
- package/src/electrum/index.ts +838 -0
- package/src/index.ts +6 -0
- package/src/shapes/electrum.ts +13 -0
- package/src/shapes/index.ts +2 -0
- package/src/shapes/wallet.ts +133 -0
- package/src/transaction/index.ts +1078 -0
- package/src/types/electrum.ts +139 -0
- package/src/types/index.ts +3 -0
- package/src/types/transaction.ts +58 -0
- package/src/types/wallet.ts +503 -0
- package/src/utils/conversion.ts +88 -0
- package/src/utils/derivation-path.ts +171 -0
- package/src/utils/electrum.ts +188 -0
- package/src/utils/exchange-rate.ts +70 -0
- package/src/utils/helpers.ts +191 -0
- package/src/utils/index.ts +7 -0
- package/src/utils/result.ts +79 -0
- package/src/utils/transaction.ts +417 -0
- package/src/utils/wallet.ts +351 -0
- package/src/wallet/constants.ts +24 -0
- package/src/wallet/index.ts +3304 -0
- package/tests/constants.ts +9 -0
- package/tests/derivation.test.ts +146 -0
- package/tests/electrum.test.ts +137 -0
- package/tests/storage.test.ts +222 -0
- package/tests/transaction.test.ts +187 -0
- package/tests/wallet.test.ts +307 -0
- package/tsconfig.json +32 -0
- package/typedoc.json +5 -0
|
@@ -0,0 +1,718 @@
|
|
|
1
|
+
[beignet](../README.md) / Electrum
|
|
2
|
+
|
|
3
|
+
# Class: Electrum
|
|
4
|
+
|
|
5
|
+
## Table of contents
|
|
6
|
+
|
|
7
|
+
### Constructors
|
|
8
|
+
|
|
9
|
+
- [constructor](Electrum.md#constructor)
|
|
10
|
+
|
|
11
|
+
### Properties
|
|
12
|
+
|
|
13
|
+
- [\_wallet](Electrum.md#_wallet)
|
|
14
|
+
- [connectedToElectrum](Electrum.md#connectedtoelectrum)
|
|
15
|
+
- [connectionPollingInterval](Electrum.md#connectionpollinginterval)
|
|
16
|
+
- [electrumNetwork](Electrum.md#electrumnetwork)
|
|
17
|
+
- [latestConnectionState](Electrum.md#latestconnectionstate)
|
|
18
|
+
- [net](Electrum.md#net)
|
|
19
|
+
- [network](Electrum.md#network)
|
|
20
|
+
- [onMessage](Electrum.md#onmessage)
|
|
21
|
+
- [onReceive](Electrum.md#onreceive)
|
|
22
|
+
- [servers](Electrum.md#servers)
|
|
23
|
+
- [tls](Electrum.md#tls)
|
|
24
|
+
|
|
25
|
+
### Accessors
|
|
26
|
+
|
|
27
|
+
- [wallet](Electrum.md#wallet)
|
|
28
|
+
|
|
29
|
+
### Methods
|
|
30
|
+
|
|
31
|
+
- [broadcastTransaction](Electrum.md#broadcasttransaction)
|
|
32
|
+
- [checkConnection](Electrum.md#checkconnection)
|
|
33
|
+
- [connectToElectrum](Electrum.md#connecttoelectrum)
|
|
34
|
+
- [disconnect](Electrum.md#disconnect)
|
|
35
|
+
- [getAddressBalance](Electrum.md#getaddressbalance)
|
|
36
|
+
- [getAddressHistory](Electrum.md#getaddresshistory)
|
|
37
|
+
- [getAddressScriptHashBalances](Electrum.md#getaddressscripthashbalances)
|
|
38
|
+
- [getBlockHashFromHex](Electrum.md#getblockhashfromhex)
|
|
39
|
+
- [getBlockHeader](Electrum.md#getblockheader)
|
|
40
|
+
- [getBlockHex](Electrum.md#getblockhex)
|
|
41
|
+
- [getConnectedPeer](Electrum.md#getconnectedpeer)
|
|
42
|
+
- [getElectrumNetwork](Electrum.md#getelectrumnetwork)
|
|
43
|
+
- [getScriptPubKeyHistory](Electrum.md#getscriptpubkeyhistory)
|
|
44
|
+
- [getTransactionMerkle](Electrum.md#gettransactionmerkle)
|
|
45
|
+
- [getTransactions](Electrum.md#gettransactions)
|
|
46
|
+
- [getTransactionsFromInputs](Electrum.md#gettransactionsfrominputs)
|
|
47
|
+
- [getUtxos](Electrum.md#getutxos)
|
|
48
|
+
- [isConnected](Electrum.md#isconnected)
|
|
49
|
+
- [listUnspentAddressScriptHashes](Electrum.md#listunspentaddressscripthashes)
|
|
50
|
+
- [publishConnectionChange](Electrum.md#publishconnectionchange)
|
|
51
|
+
- [startConnectionPolling](Electrum.md#startconnectionpolling)
|
|
52
|
+
- [stopConnectionPolling](Electrum.md#stopconnectionpolling)
|
|
53
|
+
- [subscribeToAddresses](Electrum.md#subscribetoaddresses)
|
|
54
|
+
- [subscribeToHeader](Electrum.md#subscribetoheader)
|
|
55
|
+
- [transactionExists](Electrum.md#transactionexists)
|
|
56
|
+
|
|
57
|
+
## Constructors
|
|
58
|
+
|
|
59
|
+
### constructor
|
|
60
|
+
|
|
61
|
+
• **new Electrum**(`«destructured»`)
|
|
62
|
+
|
|
63
|
+
#### Parameters
|
|
64
|
+
|
|
65
|
+
| Name | Type |
|
|
66
|
+
| :------ | :------ |
|
|
67
|
+
| `«destructured»` | `Object` |
|
|
68
|
+
| › `net?` | `Server` |
|
|
69
|
+
| › `network` | [`EAvailableNetworks`](../enums/EAvailableNetworks.md) |
|
|
70
|
+
| › `onReceive?` | (`data`: `unknown`) => `void` |
|
|
71
|
+
| › `servers?` | [`TServer`](../README.md#tserver) \| [`TServer`](../README.md#tserver)[] |
|
|
72
|
+
| › `tls?` | `TLSSocket` |
|
|
73
|
+
| › `wallet` | [`Wallet`](Wallet.md) |
|
|
74
|
+
|
|
75
|
+
#### Defined in
|
|
76
|
+
|
|
77
|
+
[electrum/index.ts:64](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L64)
|
|
78
|
+
|
|
79
|
+
## Properties
|
|
80
|
+
|
|
81
|
+
### \_wallet
|
|
82
|
+
|
|
83
|
+
• `Private` `Readonly` **\_wallet**: [`Wallet`](Wallet.md)
|
|
84
|
+
|
|
85
|
+
#### Defined in
|
|
86
|
+
|
|
87
|
+
[electrum/index.ts:52](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L52)
|
|
88
|
+
|
|
89
|
+
___
|
|
90
|
+
|
|
91
|
+
### connectedToElectrum
|
|
92
|
+
|
|
93
|
+
• **connectedToElectrum**: `boolean`
|
|
94
|
+
|
|
95
|
+
#### Defined in
|
|
96
|
+
|
|
97
|
+
[electrum/index.ts:62](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L62)
|
|
98
|
+
|
|
99
|
+
___
|
|
100
|
+
|
|
101
|
+
### connectionPollingInterval
|
|
102
|
+
|
|
103
|
+
• `Private` **connectionPollingInterval**: ``null`` \| `Timeout`
|
|
104
|
+
|
|
105
|
+
#### Defined in
|
|
106
|
+
|
|
107
|
+
[electrum/index.ts:55](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L55)
|
|
108
|
+
|
|
109
|
+
___
|
|
110
|
+
|
|
111
|
+
### electrumNetwork
|
|
112
|
+
|
|
113
|
+
• `Readonly` **electrumNetwork**: [`TElectrumNetworks`](../README.md#telectrumnetworks)
|
|
114
|
+
|
|
115
|
+
#### Defined in
|
|
116
|
+
|
|
117
|
+
[electrum/index.ts:61](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L61)
|
|
118
|
+
|
|
119
|
+
___
|
|
120
|
+
|
|
121
|
+
### latestConnectionState
|
|
122
|
+
|
|
123
|
+
• `Private` **latestConnectionState**: ``null`` \| `boolean` = `null`
|
|
124
|
+
|
|
125
|
+
#### Defined in
|
|
126
|
+
|
|
127
|
+
[electrum/index.ts:54](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L54)
|
|
128
|
+
|
|
129
|
+
___
|
|
130
|
+
|
|
131
|
+
### net
|
|
132
|
+
|
|
133
|
+
• `Private` **net**: `Server`
|
|
134
|
+
|
|
135
|
+
#### Defined in
|
|
136
|
+
|
|
137
|
+
[electrum/index.ts:57](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L57)
|
|
138
|
+
|
|
139
|
+
___
|
|
140
|
+
|
|
141
|
+
### network
|
|
142
|
+
|
|
143
|
+
• `Readonly` **network**: [`EAvailableNetworks`](../enums/EAvailableNetworks.md)
|
|
144
|
+
|
|
145
|
+
#### Defined in
|
|
146
|
+
|
|
147
|
+
[electrum/index.ts:60](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L60)
|
|
148
|
+
|
|
149
|
+
___
|
|
150
|
+
|
|
151
|
+
### onMessage
|
|
152
|
+
|
|
153
|
+
• `Private` **onMessage**: [`TOnMessage`](../README.md#tonmessage)
|
|
154
|
+
|
|
155
|
+
#### Defined in
|
|
156
|
+
|
|
157
|
+
[electrum/index.ts:53](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L53)
|
|
158
|
+
|
|
159
|
+
___
|
|
160
|
+
|
|
161
|
+
### onReceive
|
|
162
|
+
|
|
163
|
+
• `Optional` **onReceive**: (`data`: `unknown`) => `void`
|
|
164
|
+
|
|
165
|
+
#### Type declaration
|
|
166
|
+
|
|
167
|
+
▸ (`data`): `void`
|
|
168
|
+
|
|
169
|
+
##### Parameters
|
|
170
|
+
|
|
171
|
+
| Name | Type |
|
|
172
|
+
| :------ | :------ |
|
|
173
|
+
| `data` | `unknown` |
|
|
174
|
+
|
|
175
|
+
##### Returns
|
|
176
|
+
|
|
177
|
+
`void`
|
|
178
|
+
|
|
179
|
+
#### Defined in
|
|
180
|
+
|
|
181
|
+
[electrum/index.ts:63](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L63)
|
|
182
|
+
|
|
183
|
+
___
|
|
184
|
+
|
|
185
|
+
### servers
|
|
186
|
+
|
|
187
|
+
• `Optional` **servers**: [`TServer`](../README.md#tserver) \| [`TServer`](../README.md#tserver)[]
|
|
188
|
+
|
|
189
|
+
#### Defined in
|
|
190
|
+
|
|
191
|
+
[electrum/index.ts:59](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L59)
|
|
192
|
+
|
|
193
|
+
___
|
|
194
|
+
|
|
195
|
+
### tls
|
|
196
|
+
|
|
197
|
+
• `Private` **tls**: `TLSSocket`
|
|
198
|
+
|
|
199
|
+
#### Defined in
|
|
200
|
+
|
|
201
|
+
[electrum/index.ts:56](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L56)
|
|
202
|
+
|
|
203
|
+
## Accessors
|
|
204
|
+
|
|
205
|
+
### wallet
|
|
206
|
+
|
|
207
|
+
• `get` **wallet**(): [`Wallet`](Wallet.md)
|
|
208
|
+
|
|
209
|
+
#### Returns
|
|
210
|
+
|
|
211
|
+
[`Wallet`](Wallet.md)
|
|
212
|
+
|
|
213
|
+
#### Defined in
|
|
214
|
+
|
|
215
|
+
[electrum/index.ts:99](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L99)
|
|
216
|
+
|
|
217
|
+
## Methods
|
|
218
|
+
|
|
219
|
+
### broadcastTransaction
|
|
220
|
+
|
|
221
|
+
▸ **broadcastTransaction**(`«destructured»`): `Promise`\<[`Result`](../README.md#result)\<`string`\>\>
|
|
222
|
+
|
|
223
|
+
#### Parameters
|
|
224
|
+
|
|
225
|
+
| Name | Type |
|
|
226
|
+
| :------ | :------ |
|
|
227
|
+
| `«destructured»` | `Object` |
|
|
228
|
+
| › `rawTx` | `string` |
|
|
229
|
+
| › `subscribeToOutputAddress?` | `boolean` |
|
|
230
|
+
|
|
231
|
+
#### Returns
|
|
232
|
+
|
|
233
|
+
`Promise`\<[`Result`](../README.md#result)\<`string`\>\>
|
|
234
|
+
|
|
235
|
+
#### Defined in
|
|
236
|
+
|
|
237
|
+
[electrum/index.ts:743](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L743)
|
|
238
|
+
|
|
239
|
+
___
|
|
240
|
+
|
|
241
|
+
### checkConnection
|
|
242
|
+
|
|
243
|
+
▸ `Private` **checkConnection**(): `Promise`\<`void`\>
|
|
244
|
+
|
|
245
|
+
Attempts to check the current Electrum connection.
|
|
246
|
+
|
|
247
|
+
#### Returns
|
|
248
|
+
|
|
249
|
+
`Promise`\<`void`\>
|
|
250
|
+
|
|
251
|
+
#### Defined in
|
|
252
|
+
|
|
253
|
+
[electrum/index.ts:785](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L785)
|
|
254
|
+
|
|
255
|
+
___
|
|
256
|
+
|
|
257
|
+
### connectToElectrum
|
|
258
|
+
|
|
259
|
+
▸ **connectToElectrum**(`«destructured»`): `Promise`\<[`Result`](../README.md#result)\<`string`\>\>
|
|
260
|
+
|
|
261
|
+
#### Parameters
|
|
262
|
+
|
|
263
|
+
| Name | Type |
|
|
264
|
+
| :------ | :------ |
|
|
265
|
+
| `«destructured»` | `Object` |
|
|
266
|
+
| › `network?` | [`EAvailableNetworks`](../enums/EAvailableNetworks.md) |
|
|
267
|
+
| › `servers?` | [`TServer`](../README.md#tserver) \| [`TServer`](../README.md#tserver)[] |
|
|
268
|
+
|
|
269
|
+
#### Returns
|
|
270
|
+
|
|
271
|
+
`Promise`\<[`Result`](../README.md#result)\<`string`\>\>
|
|
272
|
+
|
|
273
|
+
#### Defined in
|
|
274
|
+
|
|
275
|
+
[electrum/index.ts:103](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L103)
|
|
276
|
+
|
|
277
|
+
___
|
|
278
|
+
|
|
279
|
+
### disconnect
|
|
280
|
+
|
|
281
|
+
▸ **disconnect**(): `Promise`\<`void`\>
|
|
282
|
+
|
|
283
|
+
#### Returns
|
|
284
|
+
|
|
285
|
+
`Promise`\<`void`\>
|
|
286
|
+
|
|
287
|
+
#### Defined in
|
|
288
|
+
|
|
289
|
+
[electrum/index.ts:819](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L819)
|
|
290
|
+
|
|
291
|
+
___
|
|
292
|
+
|
|
293
|
+
### getAddressBalance
|
|
294
|
+
|
|
295
|
+
▸ **getAddressBalance**(`scriptHash`): `Promise`\<[`IElectrumGetAddressBalanceRes`](../interfaces/IElectrumGetAddressBalanceRes.md)\>
|
|
296
|
+
|
|
297
|
+
Returns the balance in sats for a given address.
|
|
298
|
+
|
|
299
|
+
#### Parameters
|
|
300
|
+
|
|
301
|
+
| Name | Type |
|
|
302
|
+
| :------ | :------ |
|
|
303
|
+
| `scriptHash` | `string` |
|
|
304
|
+
|
|
305
|
+
#### Returns
|
|
306
|
+
|
|
307
|
+
`Promise`\<[`IElectrumGetAddressBalanceRes`](../interfaces/IElectrumGetAddressBalanceRes.md)\>
|
|
308
|
+
|
|
309
|
+
#### Defined in
|
|
310
|
+
|
|
311
|
+
[electrum/index.ts:144](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L144)
|
|
312
|
+
|
|
313
|
+
___
|
|
314
|
+
|
|
315
|
+
### getAddressHistory
|
|
316
|
+
|
|
317
|
+
▸ **getAddressHistory**(`«destructured»?`): `Promise`\<[`Result`](../README.md#result)\<[`IGetAddressHistoryResponse`](../interfaces/IGetAddressHistoryResponse.md)[]\>\>
|
|
318
|
+
|
|
319
|
+
Returns the available history for the provided address script hashes.
|
|
320
|
+
|
|
321
|
+
#### Parameters
|
|
322
|
+
|
|
323
|
+
| Name | Type |
|
|
324
|
+
| :------ | :------ |
|
|
325
|
+
| `«destructured»` | `Object` |
|
|
326
|
+
| › `scanAllAddresses?` | `boolean` |
|
|
327
|
+
| › `scriptHashes?` | [`IAddress`](../interfaces/IAddress.md)[] |
|
|
328
|
+
|
|
329
|
+
#### Returns
|
|
330
|
+
|
|
331
|
+
`Promise`\<[`Result`](../README.md#result)\<[`IGetAddressHistoryResponse`](../interfaces/IGetAddressHistoryResponse.md)[]\>\>
|
|
332
|
+
|
|
333
|
+
#### Defined in
|
|
334
|
+
|
|
335
|
+
[electrum/index.ts:248](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L248)
|
|
336
|
+
|
|
337
|
+
___
|
|
338
|
+
|
|
339
|
+
### getAddressScriptHashBalances
|
|
340
|
+
|
|
341
|
+
▸ **getAddressScriptHashBalances**(`scriptHashes`): `Promise`\<`any`\>
|
|
342
|
+
|
|
343
|
+
#### Parameters
|
|
344
|
+
|
|
345
|
+
| Name | Type |
|
|
346
|
+
| :------ | :------ |
|
|
347
|
+
| `scriptHashes` | `string`[] |
|
|
348
|
+
|
|
349
|
+
#### Returns
|
|
350
|
+
|
|
351
|
+
`Promise`\<`any`\>
|
|
352
|
+
|
|
353
|
+
#### Defined in
|
|
354
|
+
|
|
355
|
+
[electrum/index.ts:164](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L164)
|
|
356
|
+
|
|
357
|
+
___
|
|
358
|
+
|
|
359
|
+
### getBlockHashFromHex
|
|
360
|
+
|
|
361
|
+
▸ **getBlockHashFromHex**(`«destructured»?`): `string`
|
|
362
|
+
|
|
363
|
+
Returns the block hash given a block hex.
|
|
364
|
+
Leaving blockHex empty will return the last known block hash from storage.
|
|
365
|
+
|
|
366
|
+
#### Parameters
|
|
367
|
+
|
|
368
|
+
| Name | Type |
|
|
369
|
+
| :------ | :------ |
|
|
370
|
+
| `«destructured»` | `Object` |
|
|
371
|
+
| › `blockHex?` | `string` |
|
|
372
|
+
|
|
373
|
+
#### Returns
|
|
374
|
+
|
|
375
|
+
`string`
|
|
376
|
+
|
|
377
|
+
#### Defined in
|
|
378
|
+
|
|
379
|
+
[electrum/index.ts:574](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L574)
|
|
380
|
+
|
|
381
|
+
___
|
|
382
|
+
|
|
383
|
+
### getBlockHeader
|
|
384
|
+
|
|
385
|
+
▸ **getBlockHeader**(): [`IHeader`](../interfaces/IHeader.md)
|
|
386
|
+
|
|
387
|
+
Returns last known block height, and it's corresponding hex from local storage.
|
|
388
|
+
|
|
389
|
+
#### Returns
|
|
390
|
+
|
|
391
|
+
[`IHeader`](../interfaces/IHeader.md)
|
|
392
|
+
|
|
393
|
+
#### Defined in
|
|
394
|
+
|
|
395
|
+
[electrum/index.ts:590](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L590)
|
|
396
|
+
|
|
397
|
+
___
|
|
398
|
+
|
|
399
|
+
### getBlockHex
|
|
400
|
+
|
|
401
|
+
▸ **getBlockHex**(`«destructured»?`): `Promise`\<[`Result`](../README.md#result)\<`string`\>\>
|
|
402
|
+
|
|
403
|
+
Returns the block hex of the provided block height.
|
|
404
|
+
|
|
405
|
+
#### Parameters
|
|
406
|
+
|
|
407
|
+
| Name | Type |
|
|
408
|
+
| :------ | :------ |
|
|
409
|
+
| `«destructured»` | `Object` |
|
|
410
|
+
| › `height?` | `number` |
|
|
411
|
+
|
|
412
|
+
#### Returns
|
|
413
|
+
|
|
414
|
+
`Promise`\<[`Result`](../README.md#result)\<`string`\>\>
|
|
415
|
+
|
|
416
|
+
#### Defined in
|
|
417
|
+
|
|
418
|
+
[electrum/index.ts:552](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L552)
|
|
419
|
+
|
|
420
|
+
___
|
|
421
|
+
|
|
422
|
+
### getConnectedPeer
|
|
423
|
+
|
|
424
|
+
▸ **getConnectedPeer**(): `Promise`\<[`Result`](../README.md#result)\<[`IPeerData`](../interfaces/IPeerData.md)\>\>
|
|
425
|
+
|
|
426
|
+
Returns currently connected peer.
|
|
427
|
+
|
|
428
|
+
#### Returns
|
|
429
|
+
|
|
430
|
+
`Promise`\<[`Result`](../README.md#result)\<[`IPeerData`](../interfaces/IPeerData.md)\>\>
|
|
431
|
+
|
|
432
|
+
#### Defined in
|
|
433
|
+
|
|
434
|
+
[electrum/index.ts:175](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L175)
|
|
435
|
+
|
|
436
|
+
___
|
|
437
|
+
|
|
438
|
+
### getElectrumNetwork
|
|
439
|
+
|
|
440
|
+
▸ **getElectrumNetwork**(`network?`): [`TElectrumNetworks`](../README.md#telectrumnetworks)
|
|
441
|
+
|
|
442
|
+
Returns the network string for use with Electrum methods.
|
|
443
|
+
|
|
444
|
+
#### Parameters
|
|
445
|
+
|
|
446
|
+
| Name | Type |
|
|
447
|
+
| :------ | :------ |
|
|
448
|
+
| `network?` | [`EAvailableNetworks`](../enums/EAvailableNetworks.md) |
|
|
449
|
+
|
|
450
|
+
#### Returns
|
|
451
|
+
|
|
452
|
+
[`TElectrumNetworks`](../README.md#telectrumnetworks)
|
|
453
|
+
|
|
454
|
+
#### Defined in
|
|
455
|
+
|
|
456
|
+
[electrum/index.ts:188](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L188)
|
|
457
|
+
|
|
458
|
+
___
|
|
459
|
+
|
|
460
|
+
### getScriptPubKeyHistory
|
|
461
|
+
|
|
462
|
+
▸ **getScriptPubKeyHistory**(`scriptPubkey`): `Promise`\<[`TGetAddressHistory`](../README.md#tgetaddresshistory)[]\>
|
|
463
|
+
|
|
464
|
+
Used to retrieve scriptPubkey history for LDK.
|
|
465
|
+
|
|
466
|
+
#### Parameters
|
|
467
|
+
|
|
468
|
+
| Name | Type |
|
|
469
|
+
| :------ | :------ |
|
|
470
|
+
| `scriptPubkey` | `string` |
|
|
471
|
+
|
|
472
|
+
#### Returns
|
|
473
|
+
|
|
474
|
+
`Promise`\<[`TGetAddressHistory`](../README.md#tgetaddresshistory)[]\>
|
|
475
|
+
|
|
476
|
+
#### Defined in
|
|
477
|
+
|
|
478
|
+
[electrum/index.ts:359](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L359)
|
|
479
|
+
|
|
480
|
+
___
|
|
481
|
+
|
|
482
|
+
### getTransactionMerkle
|
|
483
|
+
|
|
484
|
+
▸ **getTransactionMerkle**(`«destructured»`): `Promise`\<\{ `block_height`: `number` ; `merkle`: `string`[] ; `pos`: `number` }\>
|
|
485
|
+
|
|
486
|
+
Returns the merkle branch to a confirmed transaction given its hash and height.
|
|
487
|
+
|
|
488
|
+
#### Parameters
|
|
489
|
+
|
|
490
|
+
| Name | Type |
|
|
491
|
+
| :------ | :------ |
|
|
492
|
+
| `«destructured»` | `Object` |
|
|
493
|
+
| › `height` | `number` |
|
|
494
|
+
| › `tx_hash` | `string` |
|
|
495
|
+
|
|
496
|
+
#### Returns
|
|
497
|
+
|
|
498
|
+
`Promise`\<\{ `block_height`: `number` ; `merkle`: `string`[] ; `pos`: `number` }\>
|
|
499
|
+
|
|
500
|
+
#### Defined in
|
|
501
|
+
|
|
502
|
+
[electrum/index.ts:629](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L629)
|
|
503
|
+
|
|
504
|
+
___
|
|
505
|
+
|
|
506
|
+
### getTransactions
|
|
507
|
+
|
|
508
|
+
▸ **getTransactions**(`txHashes`): `Promise`\<[`Result`](../README.md#result)\<[`IGetTransactions`](../interfaces/IGetTransactions.md)\>\>
|
|
509
|
+
|
|
510
|
+
Returns available transactions from electrum based on the provided txHashes.
|
|
511
|
+
|
|
512
|
+
#### Parameters
|
|
513
|
+
|
|
514
|
+
| Name | Type |
|
|
515
|
+
| :------ | :------ |
|
|
516
|
+
| `txHashes` | `Object` |
|
|
517
|
+
| `txHashes.txHashes` | [`ITxHash`](../interfaces/ITxHash.md)[] |
|
|
518
|
+
|
|
519
|
+
#### Returns
|
|
520
|
+
|
|
521
|
+
`Promise`\<[`Result`](../README.md#result)\<[`IGetTransactions`](../interfaces/IGetTransactions.md)\>\>
|
|
522
|
+
|
|
523
|
+
#### Defined in
|
|
524
|
+
|
|
525
|
+
[electrum/index.ts:477](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L477)
|
|
526
|
+
|
|
527
|
+
___
|
|
528
|
+
|
|
529
|
+
### getTransactionsFromInputs
|
|
530
|
+
|
|
531
|
+
▸ **getTransactionsFromInputs**(`txHashes`): `Promise`\<[`Result`](../README.md#result)\<[`IGetTransactionsFromInputs`](../interfaces/IGetTransactionsFromInputs.md)\>\>
|
|
532
|
+
|
|
533
|
+
Returns transactions associated with the provided transaction hashes.
|
|
534
|
+
|
|
535
|
+
#### Parameters
|
|
536
|
+
|
|
537
|
+
| Name | Type |
|
|
538
|
+
| :------ | :------ |
|
|
539
|
+
| `txHashes` | `Object` |
|
|
540
|
+
| `txHashes.txHashes` | [`ITxHash`](../interfaces/ITxHash.md)[] |
|
|
541
|
+
|
|
542
|
+
#### Returns
|
|
543
|
+
|
|
544
|
+
`Promise`\<[`Result`](../README.md#result)\<[`IGetTransactionsFromInputs`](../interfaces/IGetTransactionsFromInputs.md)\>\>
|
|
545
|
+
|
|
546
|
+
#### Defined in
|
|
547
|
+
|
|
548
|
+
[electrum/index.ts:599](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L599)
|
|
549
|
+
|
|
550
|
+
___
|
|
551
|
+
|
|
552
|
+
### getUtxos
|
|
553
|
+
|
|
554
|
+
▸ **getUtxos**(`scanAllAddresses?`): `Promise`\<[`Result`](../README.md#result)\<[`IGetUtxosResponse`](../interfaces/IGetUtxosResponse.md)\>\>
|
|
555
|
+
|
|
556
|
+
Returns UTXO's for a given wallet and network along with the available balance.
|
|
557
|
+
|
|
558
|
+
#### Parameters
|
|
559
|
+
|
|
560
|
+
| Name | Type |
|
|
561
|
+
| :------ | :------ |
|
|
562
|
+
| `scanAllAddresses?` | `Object` |
|
|
563
|
+
| `scanAllAddresses.scanAllAddresses?` | `boolean` |
|
|
564
|
+
|
|
565
|
+
#### Returns
|
|
566
|
+
|
|
567
|
+
`Promise`\<[`Result`](../README.md#result)\<[`IGetUtxosResponse`](../interfaces/IGetUtxosResponse.md)\>\>
|
|
568
|
+
|
|
569
|
+
#### Defined in
|
|
570
|
+
|
|
571
|
+
[electrum/index.ts:401](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L401)
|
|
572
|
+
|
|
573
|
+
___
|
|
574
|
+
|
|
575
|
+
### isConnected
|
|
576
|
+
|
|
577
|
+
▸ **isConnected**(): `Promise`\<`boolean`\>
|
|
578
|
+
|
|
579
|
+
#### Returns
|
|
580
|
+
|
|
581
|
+
`Promise`\<`boolean`\>
|
|
582
|
+
|
|
583
|
+
#### Defined in
|
|
584
|
+
|
|
585
|
+
[electrum/index.ts:134](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L134)
|
|
586
|
+
|
|
587
|
+
___
|
|
588
|
+
|
|
589
|
+
### listUnspentAddressScriptHashes
|
|
590
|
+
|
|
591
|
+
▸ **listUnspentAddressScriptHashes**(`«destructured»?`): `Promise`\<[`Result`](../README.md#result)\<[`IGetUtxosResponse`](../interfaces/IGetUtxosResponse.md)\>\>
|
|
592
|
+
|
|
593
|
+
Queries Electrum to return the available UTXO's and balance of the provided addresses.
|
|
594
|
+
|
|
595
|
+
#### Parameters
|
|
596
|
+
|
|
597
|
+
| Name | Type |
|
|
598
|
+
| :------ | :------ |
|
|
599
|
+
| `«destructured»` | `Object` |
|
|
600
|
+
| › `addresses` | [`TUnspentAddressScriptHashData`](../README.md#tunspentaddressscripthashdata) |
|
|
601
|
+
|
|
602
|
+
#### Returns
|
|
603
|
+
|
|
604
|
+
`Promise`\<[`Result`](../README.md#result)\<[`IGetUtxosResponse`](../interfaces/IGetUtxosResponse.md)\>\>
|
|
605
|
+
|
|
606
|
+
#### Defined in
|
|
607
|
+
|
|
608
|
+
[electrum/index.ts:206](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L206)
|
|
609
|
+
|
|
610
|
+
___
|
|
611
|
+
|
|
612
|
+
### publishConnectionChange
|
|
613
|
+
|
|
614
|
+
▸ `Private` **publishConnectionChange**(`isConnected`): `void`
|
|
615
|
+
|
|
616
|
+
#### Parameters
|
|
617
|
+
|
|
618
|
+
| Name | Type |
|
|
619
|
+
| :------ | :------ |
|
|
620
|
+
| `isConnected` | `boolean` |
|
|
621
|
+
|
|
622
|
+
#### Returns
|
|
623
|
+
|
|
624
|
+
`void`
|
|
625
|
+
|
|
626
|
+
#### Defined in
|
|
627
|
+
|
|
628
|
+
[electrum/index.ts:808](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L808)
|
|
629
|
+
|
|
630
|
+
___
|
|
631
|
+
|
|
632
|
+
### startConnectionPolling
|
|
633
|
+
|
|
634
|
+
▸ **startConnectionPolling**(): `void`
|
|
635
|
+
|
|
636
|
+
#### Returns
|
|
637
|
+
|
|
638
|
+
`void`
|
|
639
|
+
|
|
640
|
+
#### Defined in
|
|
641
|
+
|
|
642
|
+
[electrum/index.ts:824](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L824)
|
|
643
|
+
|
|
644
|
+
___
|
|
645
|
+
|
|
646
|
+
### stopConnectionPolling
|
|
647
|
+
|
|
648
|
+
▸ **stopConnectionPolling**(): `void`
|
|
649
|
+
|
|
650
|
+
#### Returns
|
|
651
|
+
|
|
652
|
+
`void`
|
|
653
|
+
|
|
654
|
+
#### Defined in
|
|
655
|
+
|
|
656
|
+
[electrum/index.ts:832](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L832)
|
|
657
|
+
|
|
658
|
+
___
|
|
659
|
+
|
|
660
|
+
### subscribeToAddresses
|
|
661
|
+
|
|
662
|
+
▸ **subscribeToAddresses**(`«destructured»?`): `Promise`\<[`Result`](../README.md#result)\<`string`\>\>
|
|
663
|
+
|
|
664
|
+
Subscribes to a number of address script hashes for receiving.
|
|
665
|
+
|
|
666
|
+
#### Parameters
|
|
667
|
+
|
|
668
|
+
| Name | Type |
|
|
669
|
+
| :------ | :------ |
|
|
670
|
+
| `«destructured»` | `Object` |
|
|
671
|
+
| › `onReceive?` | (`data`: [`TSubscribedReceive`](../README.md#tsubscribedreceive)) => `void` |
|
|
672
|
+
| › `scriptHashes?` | `string`[] |
|
|
673
|
+
|
|
674
|
+
#### Returns
|
|
675
|
+
|
|
676
|
+
`Promise`\<[`Result`](../README.md#result)\<`string`\>\>
|
|
677
|
+
|
|
678
|
+
#### Defined in
|
|
679
|
+
|
|
680
|
+
[electrum/index.ts:686](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L686)
|
|
681
|
+
|
|
682
|
+
___
|
|
683
|
+
|
|
684
|
+
### subscribeToHeader
|
|
685
|
+
|
|
686
|
+
▸ **subscribeToHeader**(): `Promise`\<[`Result`](../README.md#result)\<[`IHeader`](../interfaces/IHeader.md)\>\>
|
|
687
|
+
|
|
688
|
+
Subscribes to the current networks headers.
|
|
689
|
+
|
|
690
|
+
#### Returns
|
|
691
|
+
|
|
692
|
+
`Promise`\<[`Result`](../README.md#result)\<[`IHeader`](../interfaces/IHeader.md)\>\>
|
|
693
|
+
|
|
694
|
+
#### Defined in
|
|
695
|
+
|
|
696
|
+
[electrum/index.ts:651](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L651)
|
|
697
|
+
|
|
698
|
+
___
|
|
699
|
+
|
|
700
|
+
### transactionExists
|
|
701
|
+
|
|
702
|
+
▸ **transactionExists**(`txData`): `boolean`
|
|
703
|
+
|
|
704
|
+
Determines whether a transaction exists based on the transaction response from electrum.
|
|
705
|
+
|
|
706
|
+
#### Parameters
|
|
707
|
+
|
|
708
|
+
| Name | Type |
|
|
709
|
+
| :------ | :------ |
|
|
710
|
+
| `txData` | [`ITransaction`](../interfaces/ITransaction.md)\<[`IUtxo`](../interfaces/IUtxo.md)\> |
|
|
711
|
+
|
|
712
|
+
#### Returns
|
|
713
|
+
|
|
714
|
+
`boolean`
|
|
715
|
+
|
|
716
|
+
#### Defined in
|
|
717
|
+
|
|
718
|
+
[electrum/index.ts:529](https://github.com/synonymdev/beignet/blob/7c83290/src/electrum/index.ts#L529)
|