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.
Files changed (329) hide show
  1. package/.eslintignore +4 -0
  2. package/.eslintrc +40 -0
  3. package/.prettierrc +9 -0
  4. package/LICENSE +21 -0
  5. package/README.md +166 -0
  6. package/dist/electrum/constants.js +31 -0
  7. package/dist/electrum/constants.js.map +1 -0
  8. package/dist/electrum/index.js +552 -0
  9. package/dist/electrum/index.js.map +1 -0
  10. package/dist/index.js +23 -0
  11. package/dist/index.js.map +1 -0
  12. package/dist/shapes/electrum.js +14 -0
  13. package/dist/shapes/electrum.js.map +1 -0
  14. package/dist/shapes/index.js +19 -0
  15. package/dist/shapes/index.js.map +1 -0
  16. package/dist/shapes/wallet.js +115 -0
  17. package/dist/shapes/wallet.js.map +1 -0
  18. package/dist/transaction/index.js +692 -0
  19. package/dist/transaction/index.js.map +1 -0
  20. package/dist/types/electrum/constants.d.ts +7 -0
  21. package/dist/types/electrum/index.d.ts +85 -0
  22. package/dist/types/electrum.js +9 -0
  23. package/dist/types/electrum.js.map +1 -0
  24. package/dist/types/index.d.ts +6 -0
  25. package/dist/types/index.js +20 -0
  26. package/dist/types/index.js.map +1 -0
  27. package/dist/types/shapes/electrum.d.ts +5 -0
  28. package/dist/types/shapes/index.d.ts +2 -0
  29. package/dist/types/shapes/wallet.d.ts +10 -0
  30. package/dist/types/transaction/index.d.ts +92 -0
  31. package/dist/types/transaction.js +12 -0
  32. package/dist/types/transaction.js.map +1 -0
  33. package/dist/types/types/electrum.d.ts +113 -0
  34. package/dist/types/types/index.d.ts +3 -0
  35. package/dist/types/types/transaction.d.ts +51 -0
  36. package/dist/types/types/wallet.d.ts +400 -0
  37. package/dist/types/utils/conversion.d.ts +10 -0
  38. package/dist/types/utils/derivation-path.d.ts +19 -0
  39. package/dist/types/utils/electrum.d.ts +10 -0
  40. package/dist/types/utils/exchange-rate.d.ts +30 -0
  41. package/dist/types/utils/helpers.d.ts +23 -0
  42. package/dist/types/utils/index.d.ts +7 -0
  43. package/dist/types/utils/result.d.ts +16 -0
  44. package/dist/types/utils/transaction.d.ts +21 -0
  45. package/dist/types/utils/wallet.d.ts +47 -0
  46. package/dist/types/wallet/constants.d.ts +12 -0
  47. package/dist/types/wallet/index.d.ts +214 -0
  48. package/dist/types/wallet.js +36 -0
  49. package/dist/types/wallet.js.map +1 -0
  50. package/dist/utils/conversion.js +52 -0
  51. package/dist/utils/conversion.js.map +1 -0
  52. package/dist/utils/derivation-path.js +104 -0
  53. package/dist/utils/derivation-path.js.map +1 -0
  54. package/dist/utils/electrum.js +149 -0
  55. package/dist/utils/electrum.js.map +1 -0
  56. package/dist/utils/exchange-rate.js +49 -0
  57. package/dist/utils/exchange-rate.js.map +1 -0
  58. package/dist/utils/helpers.js +137 -0
  59. package/dist/utils/helpers.js.map +1 -0
  60. package/dist/utils/index.js +24 -0
  61. package/dist/utils/index.js.map +1 -0
  62. package/dist/utils/result.js +36 -0
  63. package/dist/utils/result.js.map +1 -0
  64. package/dist/utils/transaction.js +327 -0
  65. package/dist/utils/transaction.js.map +1 -0
  66. package/dist/utils/wallet.js +227 -0
  67. package/dist/utils/wallet.js.map +1 -0
  68. package/dist/wallet/constants.js +15 -0
  69. package/dist/wallet/constants.js.map +1 -0
  70. package/dist/wallet/index.js +2113 -0
  71. package/dist/wallet/index.js.map +1 -0
  72. package/docs/html/.nojekyll +1 -0
  73. package/docs/html/assets/highlight.css +22 -0
  74. package/docs/html/assets/main.js +58 -0
  75. package/docs/html/assets/search.js +1 -0
  76. package/docs/html/assets/style.css +1367 -0
  77. package/docs/html/classes/Electrum.html +812 -0
  78. package/docs/html/classes/Transaction.html +687 -0
  79. package/docs/html/classes/Wallet.html +2030 -0
  80. package/docs/html/enums/EAddressType.html +227 -0
  81. package/docs/html/enums/EAvailableNetworks.html +255 -0
  82. package/docs/html/enums/EBoostType.html +220 -0
  83. package/docs/html/enums/EFeeId.html +241 -0
  84. package/docs/html/enums/EPaymentType.html +220 -0
  85. package/docs/html/enums/EProtocol.html +220 -0
  86. package/docs/html/enums/EUnit.html +227 -0
  87. package/docs/html/functions/availableNetworks.html +200 -0
  88. package/docs/html/functions/constructByteCountParam.html +210 -0
  89. package/docs/html/functions/decodeOpReturnMessage.html +202 -0
  90. package/docs/html/functions/decodeRawTransaction.html +210 -0
  91. package/docs/html/functions/err.html +214 -0
  92. package/docs/html/functions/formatKeyDerivationPath.html +219 -0
  93. package/docs/html/functions/formatPeerData.html +207 -0
  94. package/docs/html/functions/generateMnemonic.html +223 -0
  95. package/docs/html/functions/generateWalletId.html +202 -0
  96. package/docs/html/functions/getAddressFromScriptPubKey.html +209 -0
  97. package/docs/html/functions/getAddressTypeFromPath.html +206 -0
  98. package/docs/html/functions/getByteCount.html +206 -0
  99. package/docs/html/functions/getDataFallback.html +207 -0
  100. package/docs/html/functions/getDefaultPort.html +209 -0
  101. package/docs/html/functions/getDefaultWalletData.html +200 -0
  102. package/docs/html/functions/getDefaultWalletDataKeys.html +200 -0
  103. package/docs/html/functions/getExchangeRates.html +200 -0
  104. package/docs/html/functions/getHighestUsedIndexFromTxHashes.html +216 -0
  105. package/docs/html/functions/getKeyDerivationPath.html +211 -0
  106. package/docs/html/functions/getKeyDerivationPathObject.html +216 -0
  107. package/docs/html/functions/getKeyDerivationPathString.html +220 -0
  108. package/docs/html/functions/getKeyValue.html +206 -0
  109. package/docs/html/functions/getPeers.html +211 -0
  110. package/docs/html/functions/getProtocolForPort.html +209 -0
  111. package/docs/html/functions/getScriptHash.html +210 -0
  112. package/docs/html/functions/getSeed.html +209 -0
  113. package/docs/html/functions/getSeedHash.html +206 -0
  114. package/docs/html/functions/getSha256.html +206 -0
  115. package/docs/html/functions/getStorageKeyValues.html +209 -0
  116. package/docs/html/functions/getTxFee.html +210 -0
  117. package/docs/html/functions/getWalletDataStorageKey.html +206 -0
  118. package/docs/html/functions/isValidBech32mEncodedString.html +211 -0
  119. package/docs/html/functions/objectKeys-1.html +211 -0
  120. package/docs/html/functions/objectsMatch.html +210 -0
  121. package/docs/html/functions/ok.html +214 -0
  122. package/docs/html/functions/parseOnChainPaymentRequest.html +204 -0
  123. package/docs/html/functions/reduceValue.html +215 -0
  124. package/docs/html/functions/removeDustOutputs.html +206 -0
  125. package/docs/html/functions/setReplaceByFee.html +210 -0
  126. package/docs/html/functions/shuffleArray.html +211 -0
  127. package/docs/html/functions/validateAddress.html +216 -0
  128. package/docs/html/functions/validateMnemonic.html +206 -0
  129. package/docs/html/functions/validateTransaction.html +206 -0
  130. package/docs/html/index.html +360 -0
  131. package/docs/html/interfaces/IAddInput.html +231 -0
  132. package/docs/html/interfaces/IAddress.html +247 -0
  133. package/docs/html/interfaces/IAddressData.html +231 -0
  134. package/docs/html/interfaces/IAddressType.html +199 -0
  135. package/docs/html/interfaces/IAddressTypeData.html +252 -0
  136. package/docs/html/interfaces/IAddresses.html +199 -0
  137. package/docs/html/interfaces/IBoostedTransaction.html +238 -0
  138. package/docs/html/interfaces/IBoostedTransactions.html +199 -0
  139. package/docs/html/interfaces/ICreateTransaction.html +224 -0
  140. package/docs/html/interfaces/ICustomGetAddress.html +231 -0
  141. package/docs/html/interfaces/ICustomGetScriptHash.html +224 -0
  142. package/docs/html/interfaces/IElectrumGetAddressBalanceRes.html +235 -0
  143. package/docs/html/interfaces/IExchangeRates.html +210 -0
  144. package/docs/html/interfaces/IFormattedPeerData.html +245 -0
  145. package/docs/html/interfaces/IFormattedTransaction.html +343 -0
  146. package/docs/html/interfaces/IFormattedTransactions.html +199 -0
  147. package/docs/html/interfaces/IGenerateAddresses.html +252 -0
  148. package/docs/html/interfaces/IGenerateAddressesResponse.html +224 -0
  149. package/docs/html/interfaces/IGetAddress.html +231 -0
  150. package/docs/html/interfaces/IGetAddressBalanceRes.html +226 -0
  151. package/docs/html/interfaces/IGetAddressByPath.html +224 -0
  152. package/docs/html/interfaces/IGetAddressHistoryResponse.html +269 -0
  153. package/docs/html/interfaces/IGetAddressResponse.html +231 -0
  154. package/docs/html/interfaces/IGetAddressScriptHashesHistoryResponse.html +245 -0
  155. package/docs/html/interfaces/IGetDerivationPath.html +259 -0
  156. package/docs/html/interfaces/IGetFeeEstimatesResponse.html +238 -0
  157. package/docs/html/interfaces/IGetHeaderResponse.html +245 -0
  158. package/docs/html/interfaces/IGetNextAvailableAddressResponse.html +238 -0
  159. package/docs/html/interfaces/IGetTransactions.html +245 -0
  160. package/docs/html/interfaces/IGetTransactionsFromInputs.html +245 -0
  161. package/docs/html/interfaces/IGetUtxosResponse.html +224 -0
  162. package/docs/html/interfaces/IHeader.html +231 -0
  163. package/docs/html/interfaces/IIndexes.html +238 -0
  164. package/docs/html/interfaces/IKeyDerivationPath.html +247 -0
  165. package/docs/html/interfaces/IKeyDerivationPathData.html +224 -0
  166. package/docs/html/interfaces/INewBlock.html +224 -0
  167. package/docs/html/interfaces/IOnchainFees.html +245 -0
  168. package/docs/html/interfaces/IOutput.html +231 -0
  169. package/docs/html/interfaces/IPeerData.html +231 -0
  170. package/docs/html/interfaces/IRbfData.html +252 -0
  171. package/docs/html/interfaces/ISend.html +224 -0
  172. package/docs/html/interfaces/ISendTransaction.html +322 -0
  173. package/docs/html/interfaces/ISendTx.html +231 -0
  174. package/docs/html/interfaces/ISetupTransaction.html +238 -0
  175. package/docs/html/interfaces/ISubscribeToAddress.html +247 -0
  176. package/docs/html/interfaces/ISubscribeToHeader.html +245 -0
  177. package/docs/html/interfaces/ITargets.html +238 -0
  178. package/docs/html/interfaces/ITransaction.html +281 -0
  179. package/docs/html/interfaces/ITxHash.html +217 -0
  180. package/docs/html/interfaces/ITxHashes.html +235 -0
  181. package/docs/html/interfaces/IUtxo.html +275 -0
  182. package/docs/html/interfaces/IVin.html +252 -0
  183. package/docs/html/interfaces/IVout.html +246 -0
  184. package/docs/html/interfaces/IWallet.html +350 -0
  185. package/docs/html/interfaces/IWalletData.html +343 -0
  186. package/docs/html/types/ElectrumConnectionPubSub.html +233 -0
  187. package/docs/html/types/ElectrumConnectionSubscription.html +204 -0
  188. package/docs/html/types/InputData.html +203 -0
  189. package/docs/html/types/ObjectKeys.html +198 -0
  190. package/docs/html/types/Result.html +201 -0
  191. package/docs/html/types/TAddressIndexInfo.html +204 -0
  192. package/docs/html/types/TAddressLabel.html +193 -0
  193. package/docs/html/types/TAddressType.html +193 -0
  194. package/docs/html/types/TAddressTypeContent.html +198 -0
  195. package/docs/html/types/TAddressTypes.html +193 -0
  196. package/docs/html/types/TAvailableNetworks.html +193 -0
  197. package/docs/html/types/TConnectToElectrumRes.html +193 -0
  198. package/docs/html/types/TDecodeRawTx.html +214 -0
  199. package/docs/html/types/TElectrumNetworks.html +193 -0
  200. package/docs/html/types/TGetAddressHistory.html +200 -0
  201. package/docs/html/types/TGetByteCountInput.html +193 -0
  202. package/docs/html/types/TGetByteCountInputs.html +193 -0
  203. package/docs/html/types/TGetByteCountOutput.html +193 -0
  204. package/docs/html/types/TGetByteCountOutputs.html +193 -0
  205. package/docs/html/types/TGetData.html +211 -0
  206. package/docs/html/types/TGetTotalFeeObj.html +204 -0
  207. package/docs/html/types/TKeyDerivationAccount.html +193 -0
  208. package/docs/html/types/TKeyDerivationChange.html +193 -0
  209. package/docs/html/types/TKeyDerivationCoinType.html +193 -0
  210. package/docs/html/types/TKeyDerivationIndex.html +193 -0
  211. package/docs/html/types/TKeyDerivationPurpose.html +193 -0
  212. package/docs/html/types/TMessageDataMap.html +210 -0
  213. package/docs/html/types/TMessageKeys.html +193 -0
  214. package/docs/html/types/TOnMessage.html +213 -0
  215. package/docs/html/types/TProcessUnconfirmedTransactions.html +202 -0
  216. package/docs/html/types/TProtocol.html +193 -0
  217. package/docs/html/types/TServer.html +204 -0
  218. package/docs/html/types/TSetData.html +213 -0
  219. package/docs/html/types/TSetupTransactionResponse.html +193 -0
  220. package/docs/html/types/TStorage.html +200 -0
  221. package/docs/html/types/TSubscribedReceive.html +193 -0
  222. package/docs/html/types/TTransactionMessage.html +198 -0
  223. package/docs/html/types/TTxResponse.html +206 -0
  224. package/docs/html/types/TTxResult.html +200 -0
  225. package/docs/html/types/TUnspentAddressScriptHashData.html +198 -0
  226. package/docs/html/types/TWalletDataKeys.html +193 -0
  227. package/docs/html/variables/defaultElectrumPorts.html +193 -0
  228. package/docs/html/variables/electrumConnection.html +199 -0
  229. package/docs/html/variables/mostUsedExchangeTickers.html +241 -0
  230. package/docs/markdown/.nojekyll +1 -0
  231. package/docs/markdown/README.md +1875 -0
  232. package/docs/markdown/classes/Electrum.md +718 -0
  233. package/docs/markdown/classes/Transaction.md +536 -0
  234. package/docs/markdown/classes/Wallet.md +2189 -0
  235. package/docs/markdown/enums/EAddressType.md +41 -0
  236. package/docs/markdown/enums/EAvailableNetworks.md +85 -0
  237. package/docs/markdown/enums/EBoostType.md +30 -0
  238. package/docs/markdown/enums/EFeeId.md +63 -0
  239. package/docs/markdown/enums/EPaymentType.md +30 -0
  240. package/docs/markdown/enums/EProtocol.md +30 -0
  241. package/docs/markdown/enums/EUnit.md +41 -0
  242. package/docs/markdown/interfaces/IAddInput.md +41 -0
  243. package/docs/markdown/interfaces/IAddress.md +69 -0
  244. package/docs/markdown/interfaces/IAddressData.md +41 -0
  245. package/docs/markdown/interfaces/IAddressType.md +7 -0
  246. package/docs/markdown/interfaces/IAddressTypeData.md +74 -0
  247. package/docs/markdown/interfaces/IAddresses.md +7 -0
  248. package/docs/markdown/interfaces/IBoostedTransaction.md +52 -0
  249. package/docs/markdown/interfaces/IBoostedTransactions.md +7 -0
  250. package/docs/markdown/interfaces/ICreateTransaction.md +30 -0
  251. package/docs/markdown/interfaces/ICustomGetAddress.md +41 -0
  252. package/docs/markdown/interfaces/ICustomGetScriptHash.md +30 -0
  253. package/docs/markdown/interfaces/IElectrumGetAddressBalanceRes.md +55 -0
  254. package/docs/markdown/interfaces/IExchangeRates.md +7 -0
  255. package/docs/markdown/interfaces/IFormattedPeerData.md +63 -0
  256. package/docs/markdown/interfaces/IFormattedTransaction.md +217 -0
  257. package/docs/markdown/interfaces/IFormattedTransactions.md +7 -0
  258. package/docs/markdown/interfaces/IGenerateAddresses.md +74 -0
  259. package/docs/markdown/interfaces/IGenerateAddressesResponse.md +30 -0
  260. package/docs/markdown/interfaces/IGetAddress.md +41 -0
  261. package/docs/markdown/interfaces/IGetAddressBalanceRes.md +36 -0
  262. package/docs/markdown/interfaces/IGetAddressByPath.md +30 -0
  263. package/docs/markdown/interfaces/IGetAddressHistoryResponse.md +121 -0
  264. package/docs/markdown/interfaces/IGetAddressResponse.md +41 -0
  265. package/docs/markdown/interfaces/IGetAddressScriptHashesHistoryResponse.md +63 -0
  266. package/docs/markdown/interfaces/IGetDerivationPath.md +100 -0
  267. package/docs/markdown/interfaces/IGetFeeEstimatesResponse.md +52 -0
  268. package/docs/markdown/interfaces/IGetHeaderResponse.md +63 -0
  269. package/docs/markdown/interfaces/IGetNextAvailableAddressResponse.md +52 -0
  270. package/docs/markdown/interfaces/IGetTransactions.md +63 -0
  271. package/docs/markdown/interfaces/IGetTransactionsFromInputs.md +63 -0
  272. package/docs/markdown/interfaces/IGetUtxosResponse.md +30 -0
  273. package/docs/markdown/interfaces/IHeader.md +41 -0
  274. package/docs/markdown/interfaces/IIndexes.md +52 -0
  275. package/docs/markdown/interfaces/IKeyDerivationPath.md +69 -0
  276. package/docs/markdown/interfaces/IKeyDerivationPathData.md +30 -0
  277. package/docs/markdown/interfaces/INewBlock.md +30 -0
  278. package/docs/markdown/interfaces/IOnchainFees.md +63 -0
  279. package/docs/markdown/interfaces/IOutput.md +41 -0
  280. package/docs/markdown/interfaces/IPeerData.md +41 -0
  281. package/docs/markdown/interfaces/IRbfData.md +74 -0
  282. package/docs/markdown/interfaces/ISend.md +30 -0
  283. package/docs/markdown/interfaces/ISendTransaction.md +184 -0
  284. package/docs/markdown/interfaces/ISendTx.md +41 -0
  285. package/docs/markdown/interfaces/ISetupTransaction.md +52 -0
  286. package/docs/markdown/interfaces/ISubscribeToAddress.md +60 -0
  287. package/docs/markdown/interfaces/ISubscribeToHeader.md +59 -0
  288. package/docs/markdown/interfaces/ITargets.md +52 -0
  289. package/docs/markdown/interfaces/ITransaction.md +88 -0
  290. package/docs/markdown/interfaces/ITxHash.md +19 -0
  291. package/docs/markdown/interfaces/ITxHashes.md +55 -0
  292. package/docs/markdown/interfaces/IUtxo.md +112 -0
  293. package/docs/markdown/interfaces/IVin.md +70 -0
  294. package/docs/markdown/interfaces/IVout.md +52 -0
  295. package/docs/markdown/interfaces/IWallet.md +209 -0
  296. package/docs/markdown/interfaces/IWalletData.md +217 -0
  297. package/example/helpers.ts +76 -0
  298. package/example/index.ts +77 -0
  299. package/package.json +69 -0
  300. package/src/electrum/constants.ts +28 -0
  301. package/src/electrum/index.ts +838 -0
  302. package/src/index.ts +6 -0
  303. package/src/shapes/electrum.ts +13 -0
  304. package/src/shapes/index.ts +2 -0
  305. package/src/shapes/wallet.ts +133 -0
  306. package/src/transaction/index.ts +1078 -0
  307. package/src/types/electrum.ts +139 -0
  308. package/src/types/index.ts +3 -0
  309. package/src/types/transaction.ts +58 -0
  310. package/src/types/wallet.ts +503 -0
  311. package/src/utils/conversion.ts +88 -0
  312. package/src/utils/derivation-path.ts +171 -0
  313. package/src/utils/electrum.ts +188 -0
  314. package/src/utils/exchange-rate.ts +70 -0
  315. package/src/utils/helpers.ts +191 -0
  316. package/src/utils/index.ts +7 -0
  317. package/src/utils/result.ts +79 -0
  318. package/src/utils/transaction.ts +417 -0
  319. package/src/utils/wallet.ts +351 -0
  320. package/src/wallet/constants.ts +24 -0
  321. package/src/wallet/index.ts +3304 -0
  322. package/tests/constants.ts +9 -0
  323. package/tests/derivation.test.ts +146 -0
  324. package/tests/electrum.test.ts +137 -0
  325. package/tests/storage.test.ts +222 -0
  326. package/tests/transaction.test.ts +187 -0
  327. package/tests/wallet.test.ts +307 -0
  328. package/tsconfig.json +32 -0
  329. package/typedoc.json +5 -0
@@ -0,0 +1,1875 @@
1
+ beignet
2
+
3
+ # beignet
4
+
5
+ ## Table of contents
6
+
7
+ ### Enumerations
8
+
9
+ - [EAddressType](enums/EAddressType.md)
10
+ - [EAvailableNetworks](enums/EAvailableNetworks.md)
11
+ - [EBoostType](enums/EBoostType.md)
12
+ - [EFeeId](enums/EFeeId.md)
13
+ - [EPaymentType](enums/EPaymentType.md)
14
+ - [EProtocol](enums/EProtocol.md)
15
+ - [EUnit](enums/EUnit.md)
16
+
17
+ ### Classes
18
+
19
+ - [Electrum](classes/Electrum.md)
20
+ - [Transaction](classes/Transaction.md)
21
+ - [Wallet](classes/Wallet.md)
22
+
23
+ ### Interfaces
24
+
25
+ - [IAddInput](interfaces/IAddInput.md)
26
+ - [IAddress](interfaces/IAddress.md)
27
+ - [IAddressData](interfaces/IAddressData.md)
28
+ - [IAddressType](interfaces/IAddressType.md)
29
+ - [IAddressTypeData](interfaces/IAddressTypeData.md)
30
+ - [IAddresses](interfaces/IAddresses.md)
31
+ - [IBoostedTransaction](interfaces/IBoostedTransaction.md)
32
+ - [IBoostedTransactions](interfaces/IBoostedTransactions.md)
33
+ - [ICreateTransaction](interfaces/ICreateTransaction.md)
34
+ - [ICustomGetAddress](interfaces/ICustomGetAddress.md)
35
+ - [ICustomGetScriptHash](interfaces/ICustomGetScriptHash.md)
36
+ - [IElectrumGetAddressBalanceRes](interfaces/IElectrumGetAddressBalanceRes.md)
37
+ - [IExchangeRates](interfaces/IExchangeRates.md)
38
+ - [IFormattedPeerData](interfaces/IFormattedPeerData.md)
39
+ - [IFormattedTransaction](interfaces/IFormattedTransaction.md)
40
+ - [IFormattedTransactions](interfaces/IFormattedTransactions.md)
41
+ - [IGenerateAddresses](interfaces/IGenerateAddresses.md)
42
+ - [IGenerateAddressesResponse](interfaces/IGenerateAddressesResponse.md)
43
+ - [IGetAddress](interfaces/IGetAddress.md)
44
+ - [IGetAddressBalanceRes](interfaces/IGetAddressBalanceRes.md)
45
+ - [IGetAddressByPath](interfaces/IGetAddressByPath.md)
46
+ - [IGetAddressHistoryResponse](interfaces/IGetAddressHistoryResponse.md)
47
+ - [IGetAddressResponse](interfaces/IGetAddressResponse.md)
48
+ - [IGetAddressScriptHashesHistoryResponse](interfaces/IGetAddressScriptHashesHistoryResponse.md)
49
+ - [IGetDerivationPath](interfaces/IGetDerivationPath.md)
50
+ - [IGetFeeEstimatesResponse](interfaces/IGetFeeEstimatesResponse.md)
51
+ - [IGetHeaderResponse](interfaces/IGetHeaderResponse.md)
52
+ - [IGetNextAvailableAddressResponse](interfaces/IGetNextAvailableAddressResponse.md)
53
+ - [IGetTransactions](interfaces/IGetTransactions.md)
54
+ - [IGetTransactionsFromInputs](interfaces/IGetTransactionsFromInputs.md)
55
+ - [IGetUtxosResponse](interfaces/IGetUtxosResponse.md)
56
+ - [IHeader](interfaces/IHeader.md)
57
+ - [IIndexes](interfaces/IIndexes.md)
58
+ - [IKeyDerivationPath](interfaces/IKeyDerivationPath.md)
59
+ - [IKeyDerivationPathData](interfaces/IKeyDerivationPathData.md)
60
+ - [INewBlock](interfaces/INewBlock.md)
61
+ - [IOnchainFees](interfaces/IOnchainFees.md)
62
+ - [IOutput](interfaces/IOutput.md)
63
+ - [IPeerData](interfaces/IPeerData.md)
64
+ - [IRbfData](interfaces/IRbfData.md)
65
+ - [ISend](interfaces/ISend.md)
66
+ - [ISendTransaction](interfaces/ISendTransaction.md)
67
+ - [ISendTx](interfaces/ISendTx.md)
68
+ - [ISetupTransaction](interfaces/ISetupTransaction.md)
69
+ - [ISubscribeToAddress](interfaces/ISubscribeToAddress.md)
70
+ - [ISubscribeToHeader](interfaces/ISubscribeToHeader.md)
71
+ - [ITargets](interfaces/ITargets.md)
72
+ - [ITransaction](interfaces/ITransaction.md)
73
+ - [ITxHash](interfaces/ITxHash.md)
74
+ - [ITxHashes](interfaces/ITxHashes.md)
75
+ - [IUtxo](interfaces/IUtxo.md)
76
+ - [IVin](interfaces/IVin.md)
77
+ - [IVout](interfaces/IVout.md)
78
+ - [IWallet](interfaces/IWallet.md)
79
+ - [IWalletData](interfaces/IWalletData.md)
80
+
81
+ ### Type Aliases
82
+
83
+ - [ElectrumConnectionPubSub](README.md#electrumconnectionpubsub)
84
+ - [ElectrumConnectionSubscription](README.md#electrumconnectionsubscription)
85
+ - [InputData](README.md#inputdata)
86
+ - [ObjectKeys](README.md#objectkeys)
87
+ - [Result](README.md#result)
88
+ - [TAddressIndexInfo](README.md#taddressindexinfo)
89
+ - [TAddressLabel](README.md#taddresslabel)
90
+ - [TAddressType](README.md#taddresstype)
91
+ - [TAddressTypeContent](README.md#taddresstypecontent)
92
+ - [TAddressTypes](README.md#taddresstypes)
93
+ - [TAvailableNetworks](README.md#tavailablenetworks)
94
+ - [TConnectToElectrumRes](README.md#tconnecttoelectrumres)
95
+ - [TDecodeRawTx](README.md#tdecoderawtx)
96
+ - [TElectrumNetworks](README.md#telectrumnetworks)
97
+ - [TGetAddressHistory](README.md#tgetaddresshistory)
98
+ - [TGetByteCountInput](README.md#tgetbytecountinput)
99
+ - [TGetByteCountInputs](README.md#tgetbytecountinputs)
100
+ - [TGetByteCountOutput](README.md#tgetbytecountoutput)
101
+ - [TGetByteCountOutputs](README.md#tgetbytecountoutputs)
102
+ - [TGetData](README.md#tgetdata)
103
+ - [TGetTotalFeeObj](README.md#tgettotalfeeobj)
104
+ - [TKeyDerivationAccount](README.md#tkeyderivationaccount)
105
+ - [TKeyDerivationChange](README.md#tkeyderivationchange)
106
+ - [TKeyDerivationCoinType](README.md#tkeyderivationcointype)
107
+ - [TKeyDerivationIndex](README.md#tkeyderivationindex)
108
+ - [TKeyDerivationPurpose](README.md#tkeyderivationpurpose)
109
+ - [TMessageDataMap](README.md#tmessagedatamap)
110
+ - [TMessageKeys](README.md#tmessagekeys)
111
+ - [TOnMessage](README.md#tonmessage)
112
+ - [TProcessUnconfirmedTransactions](README.md#tprocessunconfirmedtransactions)
113
+ - [TProtocol](README.md#tprotocol)
114
+ - [TServer](README.md#tserver)
115
+ - [TSetData](README.md#tsetdata)
116
+ - [TSetupTransactionResponse](README.md#tsetuptransactionresponse)
117
+ - [TStorage](README.md#tstorage)
118
+ - [TSubscribedReceive](README.md#tsubscribedreceive)
119
+ - [TTransactionMessage](README.md#ttransactionmessage)
120
+ - [TTxResponse](README.md#ttxresponse)
121
+ - [TTxResult](README.md#ttxresult)
122
+ - [TUnspentAddressScriptHashData](README.md#tunspentaddressscripthashdata)
123
+ - [TWalletDataKeys](README.md#twalletdatakeys)
124
+
125
+ ### Variables
126
+
127
+ - [defaultElectrumPorts](README.md#defaultelectrumports)
128
+ - [electrumConnection](README.md#electrumconnection)
129
+ - [mostUsedExchangeTickers](README.md#mostusedexchangetickers)
130
+
131
+ ### Functions
132
+
133
+ - [availableNetworks](README.md#availablenetworks)
134
+ - [constructByteCountParam](README.md#constructbytecountparam)
135
+ - [decodeOpReturnMessage](README.md#decodeopreturnmessage)
136
+ - [decodeRawTransaction](README.md#decoderawtransaction)
137
+ - [err](README.md#err)
138
+ - [formatKeyDerivationPath](README.md#formatkeyderivationpath)
139
+ - [formatPeerData](README.md#formatpeerdata)
140
+ - [generateMnemonic](README.md#generatemnemonic)
141
+ - [generateWalletId](README.md#generatewalletid)
142
+ - [getAddressFromScriptPubKey](README.md#getaddressfromscriptpubkey)
143
+ - [getAddressTypeFromPath](README.md#getaddresstypefrompath)
144
+ - [getByteCount](README.md#getbytecount)
145
+ - [getDataFallback](README.md#getdatafallback)
146
+ - [getDefaultPort](README.md#getdefaultport)
147
+ - [getDefaultWalletData](README.md#getdefaultwalletdata)
148
+ - [getDefaultWalletDataKeys](README.md#getdefaultwalletdatakeys)
149
+ - [getExchangeRates](README.md#getexchangerates)
150
+ - [getHighestUsedIndexFromTxHashes](README.md#gethighestusedindexfromtxhashes)
151
+ - [getKeyDerivationPath](README.md#getkeyderivationpath)
152
+ - [getKeyDerivationPathObject](README.md#getkeyderivationpathobject)
153
+ - [getKeyDerivationPathString](README.md#getkeyderivationpathstring)
154
+ - [getKeyValue](README.md#getkeyvalue)
155
+ - [getPeers](README.md#getpeers)
156
+ - [getProtocolForPort](README.md#getprotocolforport)
157
+ - [getScriptHash](README.md#getscripthash)
158
+ - [getSeed](README.md#getseed)
159
+ - [getSeedHash](README.md#getseedhash)
160
+ - [getSha256](README.md#getsha256)
161
+ - [getStorageKeyValues](README.md#getstoragekeyvalues)
162
+ - [getTxFee](README.md#gettxfee)
163
+ - [getWalletDataStorageKey](README.md#getwalletdatastoragekey)
164
+ - [isValidBech32mEncodedString](README.md#isvalidbech32mencodedstring)
165
+ - [objectKeys](README.md#objectkeys-1)
166
+ - [objectsMatch](README.md#objectsmatch)
167
+ - [ok](README.md#ok)
168
+ - [parseOnChainPaymentRequest](README.md#parseonchainpaymentrequest)
169
+ - [reduceValue](README.md#reducevalue)
170
+ - [removeDustOutputs](README.md#removedustoutputs)
171
+ - [setReplaceByFee](README.md#setreplacebyfee)
172
+ - [shuffleArray](README.md#shufflearray)
173
+ - [validateAddress](README.md#validateaddress)
174
+ - [validateMnemonic](README.md#validatemnemonic)
175
+ - [validateTransaction](README.md#validatetransaction)
176
+
177
+ ## Type Aliases
178
+
179
+ ### ElectrumConnectionPubSub
180
+
181
+ Ƭ **ElectrumConnectionPubSub**: `Object`
182
+
183
+ #### Type declaration
184
+
185
+ | Name | Type |
186
+ | :------ | :------ |
187
+ | `publish` | (`isConnected`: `boolean`) => `void` |
188
+ | `subscribe` | (`callback`: (`isConnected`: `boolean`) => `void`) => [`ElectrumConnectionSubscription`](README.md#electrumconnectionsubscription) |
189
+
190
+ #### Defined in
191
+
192
+ [types/electrum.ts:128](https://github.com/synonymdev/beignet/blob/7c83290/src/types/electrum.ts#L128)
193
+
194
+ ___
195
+
196
+ ### ElectrumConnectionSubscription
197
+
198
+ Ƭ **ElectrumConnectionSubscription**: `Object`
199
+
200
+ #### Type declaration
201
+
202
+ | Name | Type |
203
+ | :------ | :------ |
204
+ | `remove` | () => `void` |
205
+
206
+ #### Defined in
207
+
208
+ [types/electrum.ts:135](https://github.com/synonymdev/beignet/blob/7c83290/src/types/electrum.ts#L135)
209
+
210
+ ___
211
+
212
+ ### InputData
213
+
214
+ Ƭ **InputData**: `Object`
215
+
216
+ #### Index signature
217
+
218
+ ▪ [key: `string`]: \{ `addresses`: `string`[] ; `value`: `number` }
219
+
220
+ #### Defined in
221
+
222
+ [types/wallet.ts:379](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L379)
223
+
224
+ ___
225
+
226
+ ### ObjectKeys
227
+
228
+ Ƭ **ObjectKeys**\<`T`\>: \`$\{Exclude\<keyof T, symbol\>}\`
229
+
230
+ #### Type parameters
231
+
232
+ | Name | Type |
233
+ | :------ | :------ |
234
+ | `T` | extends `object` |
235
+
236
+ #### Defined in
237
+
238
+ [types/wallet.ts:452](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L452)
239
+
240
+ ___
241
+
242
+ ### Result
243
+
244
+ Ƭ **Result**\<`T`\>: `Ok`\<`T`\> \| `Err`\<`T`\>
245
+
246
+ Represents a result that can be successful (Ok) or contain an error (Err).
247
+
248
+ #### Type parameters
249
+
250
+ | Name |
251
+ | :------ |
252
+ | `T` |
253
+
254
+ #### Defined in
255
+
256
+ [utils/result.ts:4](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/result.ts#L4)
257
+
258
+ ___
259
+
260
+ ### TAddressIndexInfo
261
+
262
+ Ƭ **TAddressIndexInfo**: `Object`
263
+
264
+ #### Type declaration
265
+
266
+ | Name | Type |
267
+ | :------ | :------ |
268
+ | `addressIndex` | [`IAddress`](interfaces/IAddress.md) |
269
+ | `changeAddressIndex` | [`IAddress`](interfaces/IAddress.md) |
270
+ | `lastUsedAddressIndex` | [`IAddress`](interfaces/IAddress.md) |
271
+ | `lastUsedChangeAddressIndex` | [`IAddress`](interfaces/IAddress.md) |
272
+
273
+ #### Defined in
274
+
275
+ [types/wallet.ts:473](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L473)
276
+
277
+ ___
278
+
279
+ ### TAddressLabel
280
+
281
+ Ƭ **TAddressLabel**: ``"bech32"`` \| ``"segwit"`` \| ``"legacy"``
282
+
283
+ #### Defined in
284
+
285
+ [types/wallet.ts:15](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L15)
286
+
287
+ ___
288
+
289
+ ### TAddressType
290
+
291
+ Ƭ **TAddressType**: ``"p2wpkh"`` \| ``"p2sh"`` \| ``"p2pkh"``
292
+
293
+ #### Defined in
294
+
295
+ [types/wallet.ts:14](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L14)
296
+
297
+ ___
298
+
299
+ ### TAddressTypeContent
300
+
301
+ Ƭ **TAddressTypeContent**\<`T`\>: \{ [key in EAddressType]: T }
302
+
303
+ #### Type parameters
304
+
305
+ | Name |
306
+ | :------ |
307
+ | `T` |
308
+
309
+ #### Defined in
310
+
311
+ [types/wallet.ts:46](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L46)
312
+
313
+ ___
314
+
315
+ ### TAddressTypes
316
+
317
+ Ƭ **TAddressTypes**: \{ [key in EAddressType]: Readonly\<IAddressTypeData\> }
318
+
319
+ #### Defined in
320
+
321
+ [types/wallet.ts:21](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L21)
322
+
323
+ ___
324
+
325
+ ### TAvailableNetworks
326
+
327
+ Ƭ **TAvailableNetworks**: ``"bitcoin"`` \| ``"testnet"`` \| ``"regtest"``
328
+
329
+ #### Defined in
330
+
331
+ [types/wallet.ts:13](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L13)
332
+
333
+ ___
334
+
335
+ ### TConnectToElectrumRes
336
+
337
+ Ƭ **TConnectToElectrumRes**: `string`
338
+
339
+ #### Defined in
340
+
341
+ [types/electrum.ts:11](https://github.com/synonymdev/beignet/blob/7c83290/src/types/electrum.ts#L11)
342
+
343
+ ___
344
+
345
+ ### TDecodeRawTx
346
+
347
+ Ƭ **TDecodeRawTx**: `Object`
348
+
349
+ #### Type declaration
350
+
351
+ | Name | Type |
352
+ | :------ | :------ |
353
+ | `locktime` | `number` |
354
+ | `size` | `number` |
355
+ | `tx_hash` | `string` |
356
+ | `txid` | `string` |
357
+ | `version` | `number` |
358
+ | `vin` | [`IVin`](interfaces/IVin.md)[] |
359
+ | `vout` | [`IVout`](interfaces/IVout.md)[] |
360
+ | `vsize` | `number` |
361
+ | `weight` | `number` |
362
+
363
+ #### Defined in
364
+
365
+ [types/transaction.ts:41](https://github.com/synonymdev/beignet/blob/7c83290/src/types/transaction.ts#L41)
366
+
367
+ ___
368
+
369
+ ### TElectrumNetworks
370
+
371
+ Ƭ **TElectrumNetworks**: ``"bitcoin"`` \| ``"bitcoinTestnet"`` \| ``"bitcoinRegtest"``
372
+
373
+ #### Defined in
374
+
375
+ [types/electrum.ts:9](https://github.com/synonymdev/beignet/blob/7c83290/src/types/electrum.ts#L9)
376
+
377
+ ___
378
+
379
+ ### TGetAddressHistory
380
+
381
+ Ƭ **TGetAddressHistory**: `Object`
382
+
383
+ #### Type declaration
384
+
385
+ | Name | Type |
386
+ | :------ | :------ |
387
+ | `height` | `number` |
388
+ | `txid` | `string` |
389
+
390
+ #### Defined in
391
+
392
+ [types/electrum.ts:139](https://github.com/synonymdev/beignet/blob/7c83290/src/types/electrum.ts#L139)
393
+
394
+ ___
395
+
396
+ ### TGetByteCountInput
397
+
398
+ Ƭ **TGetByteCountInput**: \`MULTISIG-P2SH:$\{number}-$\{number}\` \| \`MULTISIG-P2WSH:$\{number}-$\{number}\` \| \`MULTISIG-P2SH-P2WSH:$\{number}-$\{number}\` \| ``"P2SH-P2WPKH"`` \| ``"P2PKH"`` \| ``"p2pkh"`` \| ``"P2WPKH"`` \| ``"p2wpkh"`` \| ``"P2SH"`` \| ``"p2sh"`` \| ``"P2TR"`` \| ``"p2tr"``
399
+
400
+ #### Defined in
401
+
402
+ [types/wallet.ts:394](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L394)
403
+
404
+ ___
405
+
406
+ ### TGetByteCountInputs
407
+
408
+ Ƭ **TGetByteCountInputs**: \{ [key in TGetByteCountInput]?: number }
409
+
410
+ #### Defined in
411
+
412
+ [types/wallet.ts:386](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L386)
413
+
414
+ ___
415
+
416
+ ### TGetByteCountOutput
417
+
418
+ Ƭ **TGetByteCountOutput**: ``"P2SH"`` \| ``"P2PKH"`` \| ``"P2WPKH"`` \| ``"P2WSH"`` \| ``"p2wpkh"`` \| ``"p2sh"`` \| ``"p2pkh"`` \| ``"P2TR"`` \| ``"p2tr"``
419
+
420
+ #### Defined in
421
+
422
+ [types/wallet.ts:408](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L408)
423
+
424
+ ___
425
+
426
+ ### TGetByteCountOutputs
427
+
428
+ Ƭ **TGetByteCountOutputs**: \{ [key in TGetByteCountOutput]?: number }
429
+
430
+ #### Defined in
431
+
432
+ [types/wallet.ts:390](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L390)
433
+
434
+ ___
435
+
436
+ ### TGetData
437
+
438
+ Ƭ **TGetData**: \<K\>(`key`: `string`) => `Promise`\<[`Result`](README.md#result)\<[`IWalletData`](interfaces/IWalletData.md)[`K`]\>\>
439
+
440
+ #### Type declaration
441
+
442
+ ▸ \<`K`\>(`key`): `Promise`\<[`Result`](README.md#result)\<[`IWalletData`](interfaces/IWalletData.md)[`K`]\>\>
443
+
444
+ ##### Type parameters
445
+
446
+ | Name | Type |
447
+ | :------ | :------ |
448
+ | `K` | extends keyof [`IWalletData`](interfaces/IWalletData.md) |
449
+
450
+ ##### Parameters
451
+
452
+ | Name | Type |
453
+ | :------ | :------ |
454
+ | `key` | `string` |
455
+
456
+ ##### Returns
457
+
458
+ `Promise`\<[`Result`](README.md#result)\<[`IWalletData`](interfaces/IWalletData.md)[`K`]\>\>
459
+
460
+ #### Defined in
461
+
462
+ [types/wallet.ts:173](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L173)
463
+
464
+ ___
465
+
466
+ ### TGetTotalFeeObj
467
+
468
+ Ƭ **TGetTotalFeeObj**: `Object`
469
+
470
+ #### Type declaration
471
+
472
+ | Name | Type |
473
+ | :------ | :------ |
474
+ | `maxSatPerByte` | `number` |
475
+ | `satsPerByte` | `number` |
476
+ | `totalFee` | `number` |
477
+ | `transactionByteCount` | `number` |
478
+
479
+ #### Defined in
480
+
481
+ [types/transaction.ts:53](https://github.com/synonymdev/beignet/blob/7c83290/src/types/transaction.ts#L53)
482
+
483
+ ___
484
+
485
+ ### TKeyDerivationAccount
486
+
487
+ Ƭ **TKeyDerivationAccount**: ``"0"`` \| `string`
488
+
489
+ #### Defined in
490
+
491
+ [types/wallet.ts:18](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L18)
492
+
493
+ ___
494
+
495
+ ### TKeyDerivationChange
496
+
497
+ Ƭ **TKeyDerivationChange**: ``"0"`` \| ``"1"``
498
+
499
+ #### Defined in
500
+
501
+ [types/wallet.ts:19](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L19)
502
+
503
+ ___
504
+
505
+ ### TKeyDerivationCoinType
506
+
507
+ Ƭ **TKeyDerivationCoinType**: ``"0"`` \| ``"1"`` \| `string`
508
+
509
+ #### Defined in
510
+
511
+ [types/wallet.ts:17](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L17)
512
+
513
+ ___
514
+
515
+ ### TKeyDerivationIndex
516
+
517
+ Ƭ **TKeyDerivationIndex**: `string`
518
+
519
+ #### Defined in
520
+
521
+ [types/wallet.ts:20](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L20)
522
+
523
+ ___
524
+
525
+ ### TKeyDerivationPurpose
526
+
527
+ Ƭ **TKeyDerivationPurpose**: ``"84"`` \| ``"49"`` \| ``"44"`` \| `string`
528
+
529
+ #### Defined in
530
+
531
+ [types/wallet.ts:16](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L16)
532
+
533
+ ___
534
+
535
+ ### TMessageDataMap
536
+
537
+ Ƭ **TMessageDataMap**: `Object`
538
+
539
+ #### Type declaration
540
+
541
+ | Name | Type |
542
+ | :------ | :------ |
543
+ | `connectedToElectrum` | `boolean` |
544
+ | `newBlock` | [`INewBlock`](interfaces/INewBlock.md) |
545
+ | `rbf` | `string`[] |
546
+ | `reorg` | [`IUtxo`](interfaces/IUtxo.md)[] |
547
+ | `transactionConfirmed` | [`TTransactionMessage`](README.md#ttransactionmessage) |
548
+ | `transactionReceived` | [`TTransactionMessage`](README.md#ttransactionmessage) |
549
+ | `transactionSent` | [`TTransactionMessage`](README.md#ttransactionmessage) |
550
+
551
+ #### Defined in
552
+
553
+ [types/wallet.ts:435](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L435)
554
+
555
+ ___
556
+
557
+ ### TMessageKeys
558
+
559
+ Ƭ **TMessageKeys**: keyof [`TMessageDataMap`](README.md#tmessagedatamap)
560
+
561
+ #### Defined in
562
+
563
+ [types/wallet.ts:460](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L460)
564
+
565
+ ___
566
+
567
+ ### TOnMessage
568
+
569
+ Ƭ **TOnMessage**: \<K\>(`key`: `K`, `data`: [`TMessageDataMap`](README.md#tmessagedatamap)[`K`]) => `void`
570
+
571
+ #### Type declaration
572
+
573
+ ▸ \<`K`\>(`key`, `data`): `void`
574
+
575
+ ##### Type parameters
576
+
577
+ | Name | Type |
578
+ | :------ | :------ |
579
+ | `K` | extends keyof [`TMessageDataMap`](README.md#tmessagedatamap) |
580
+
581
+ ##### Parameters
582
+
583
+ | Name | Type |
584
+ | :------ | :------ |
585
+ | `key` | `K` |
586
+ | `data` | [`TMessageDataMap`](README.md#tmessagedatamap)[`K`] |
587
+
588
+ ##### Returns
589
+
590
+ `void`
591
+
592
+ #### Defined in
593
+
594
+ [types/wallet.ts:455](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L455)
595
+
596
+ ___
597
+
598
+ ### TProcessUnconfirmedTransactions
599
+
600
+ Ƭ **TProcessUnconfirmedTransactions**: `Object`
601
+
602
+ #### Type declaration
603
+
604
+ | Name | Type |
605
+ | :------ | :------ |
606
+ | `ghostTxs` | `string`[] |
607
+ | `outdatedTxs` | [`IUtxo`](interfaces/IUtxo.md)[] |
608
+ | `unconfirmedTxs` | [`IFormattedTransactions`](interfaces/IFormattedTransactions.md) |
609
+
610
+ #### Defined in
611
+
612
+ [types/wallet.ts:357](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L357)
613
+
614
+ ___
615
+
616
+ ### TProtocol
617
+
618
+ Ƭ **TProtocol**: ``"tcp"`` \| ``"ssl"``
619
+
620
+ #### Defined in
621
+
622
+ [types/electrum.ts:23](https://github.com/synonymdev/beignet/blob/7c83290/src/types/electrum.ts#L23)
623
+
624
+ ___
625
+
626
+ ### TServer
627
+
628
+ Ƭ **TServer**: `Object`
629
+
630
+ #### Type declaration
631
+
632
+ | Name | Type |
633
+ | :------ | :------ |
634
+ | `host` | `string` |
635
+ | `protocol` | [`EProtocol`](enums/EProtocol.md) |
636
+ | `ssl` | `number` |
637
+ | `tcp` | `number` |
638
+
639
+ #### Defined in
640
+
641
+ [types/electrum.ts:17](https://github.com/synonymdev/beignet/blob/7c83290/src/types/electrum.ts#L17)
642
+
643
+ ___
644
+
645
+ ### TSetData
646
+
647
+ Ƭ **TSetData**: \<K\>(`key`: `string`, `value`: [`IWalletData`](interfaces/IWalletData.md)[`K`]) => `Promise`\<[`Result`](README.md#result)\<`boolean`\>\>
648
+
649
+ #### Type declaration
650
+
651
+ ▸ \<`K`\>(`key`, `value`): `Promise`\<[`Result`](README.md#result)\<`boolean`\>\>
652
+
653
+ ##### Type parameters
654
+
655
+ | Name | Type |
656
+ | :------ | :------ |
657
+ | `K` | extends keyof [`IWalletData`](interfaces/IWalletData.md) |
658
+
659
+ ##### Parameters
660
+
661
+ | Name | Type |
662
+ | :------ | :------ |
663
+ | `key` | `string` |
664
+ | `value` | [`IWalletData`](interfaces/IWalletData.md)[`K`] |
665
+
666
+ ##### Returns
667
+
668
+ `Promise`\<[`Result`](README.md#result)\<`boolean`\>\>
669
+
670
+ #### Defined in
671
+
672
+ [types/wallet.ts:176](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L176)
673
+
674
+ ___
675
+
676
+ ### TSetupTransactionResponse
677
+
678
+ Ƭ **TSetupTransactionResponse**: [`Result`](README.md#result)\<`Partial`\<[`ISendTransaction`](interfaces/ISendTransaction.md)\>\>
679
+
680
+ #### Defined in
681
+
682
+ [types/transaction.ts:39](https://github.com/synonymdev/beignet/blob/7c83290/src/types/transaction.ts#L39)
683
+
684
+ ___
685
+
686
+ ### TStorage
687
+
688
+ Ƭ **TStorage**: `Object`
689
+
690
+ #### Type declaration
691
+
692
+ | Name | Type |
693
+ | :------ | :------ |
694
+ | `getData?` | [`TGetData`](README.md#tgetdata) |
695
+ | `setData?` | [`TSetData`](README.md#tsetdata) |
696
+
697
+ #### Defined in
698
+
699
+ [types/wallet.ts:480](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L480)
700
+
701
+ ___
702
+
703
+ ### TSubscribedReceive
704
+
705
+ Ƭ **TSubscribedReceive**: [`string`, `string`]
706
+
707
+ #### Defined in
708
+
709
+ [types/electrum.ts:112](https://github.com/synonymdev/beignet/blob/7c83290/src/types/electrum.ts#L112)
710
+
711
+ ___
712
+
713
+ ### TTransactionMessage
714
+
715
+ Ƭ **TTransactionMessage**: `Object`
716
+
717
+ #### Type declaration
718
+
719
+ | Name | Type |
720
+ | :------ | :------ |
721
+ | `transaction` | [`IFormattedTransaction`](interfaces/IFormattedTransaction.md) |
722
+
723
+ #### Defined in
724
+
725
+ [types/wallet.ts:445](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L445)
726
+
727
+ ___
728
+
729
+ ### TTxResponse
730
+
731
+ Ƭ **TTxResponse**: `Object`
732
+
733
+ #### Type declaration
734
+
735
+ | Name | Type |
736
+ | :------ | :------ |
737
+ | `data` | [`IAddress`](interfaces/IAddress.md) |
738
+ | `id` | `number` |
739
+ | `jsonrpc` | `string` |
740
+ | `param` | `string` |
741
+ | `result` | [`TTxResult`](README.md#ttxresult)[] |
742
+
743
+ #### Defined in
744
+
745
+ [types/electrum.ts:51](https://github.com/synonymdev/beignet/blob/7c83290/src/types/electrum.ts#L51)
746
+
747
+ ___
748
+
749
+ ### TTxResult
750
+
751
+ Ƭ **TTxResult**: `Object`
752
+
753
+ #### Type declaration
754
+
755
+ | Name | Type |
756
+ | :------ | :------ |
757
+ | `height` | `number` |
758
+ | `tx_hash` | `string` |
759
+
760
+ #### Defined in
761
+
762
+ [types/electrum.ts:38](https://github.com/synonymdev/beignet/blob/7c83290/src/types/electrum.ts#L38)
763
+
764
+ ___
765
+
766
+ ### TUnspentAddressScriptHashData
767
+
768
+ Ƭ **TUnspentAddressScriptHashData**: `Object`
769
+
770
+ #### Index signature
771
+
772
+ ▪ [x: `string`]: [`IUtxo`](interfaces/IUtxo.md) \| [`IAddress`](interfaces/IAddress.md)
773
+
774
+ #### Defined in
775
+
776
+ [types/electrum.ts:34](https://github.com/synonymdev/beignet/blob/7c83290/src/types/electrum.ts#L34)
777
+
778
+ ___
779
+
780
+ ### TWalletDataKeys
781
+
782
+ Ƭ **TWalletDataKeys**: keyof [`IWalletData`](interfaces/IWalletData.md)
783
+
784
+ #### Defined in
785
+
786
+ [types/wallet.ts:171](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L171)
787
+
788
+ ## Variables
789
+
790
+ ### defaultElectrumPorts
791
+
792
+ • `Const` **defaultElectrumPorts**: `string`[]
793
+
794
+ #### Defined in
795
+
796
+ [utils/electrum.ts:14](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/electrum.ts#L14)
797
+
798
+ ___
799
+
800
+ ### electrumConnection
801
+
802
+ • `Const` **electrumConnection**: [`ElectrumConnectionPubSub`](README.md#electrumconnectionpubsub)
803
+
804
+ Background task that checks the connection to the Electrum server with a PubSub
805
+ If connection was lost this will try to reconnect in the specified interval
806
+
807
+ **`Param`**
808
+
809
+ #### Defined in
810
+
811
+ [utils/electrum.ts:133](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/electrum.ts#L133)
812
+
813
+ ___
814
+
815
+ ### mostUsedExchangeTickers
816
+
817
+ • `Const` **mostUsedExchangeTickers**: `Object`
818
+
819
+ #### Type declaration
820
+
821
+ | Name | Type |
822
+ | :------ | :------ |
823
+ | `CAD` | \{ `currencySymbol`: `string` = '$'; `quote`: `string` = 'CAD'; `quoteName`: `string` = 'Canadian Dollar' } |
824
+ | `CAD.currencySymbol` | `string` |
825
+ | `CAD.quote` | `string` |
826
+ | `CAD.quoteName` | `string` |
827
+ | `CNY` | \{ `currencySymbol`: `string` = '¥'; `quote`: `string` = 'CNY'; `quoteName`: `string` = 'Chinese Yuan Renminbi' } |
828
+ | `CNY.currencySymbol` | `string` |
829
+ | `CNY.quote` | `string` |
830
+ | `CNY.quoteName` | `string` |
831
+ | `EUR` | \{ `currencySymbol`: `string` = '€'; `quote`: `string` = 'EUR'; `quoteName`: `string` = 'Euro' } |
832
+ | `EUR.currencySymbol` | `string` |
833
+ | `EUR.quote` | `string` |
834
+ | `EUR.quoteName` | `string` |
835
+ | `GBP` | \{ `currencySymbol`: `string` = '£'; `quote`: `string` = 'GBP'; `quoteName`: `string` = 'Great British Pound' } |
836
+ | `GBP.currencySymbol` | `string` |
837
+ | `GBP.quote` | `string` |
838
+ | `GBP.quoteName` | `string` |
839
+ | `USD` | \{ `currencySymbol`: `string` = '$'; `quote`: `string` = 'USD'; `quoteName`: `string` = 'US Dollar' } |
840
+ | `USD.currencySymbol` | `string` |
841
+ | `USD.quote` | `string` |
842
+ | `USD.quoteName` | `string` |
843
+
844
+ #### Defined in
845
+
846
+ [utils/exchange-rate.ts:5](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/exchange-rate.ts#L5)
847
+
848
+ ## Functions
849
+
850
+ ### availableNetworks
851
+
852
+ ▸ **availableNetworks**(): [`EAvailableNetworks`](enums/EAvailableNetworks.md)[]
853
+
854
+ Returns an array of all available networks from the networks object.
855
+
856
+ #### Returns
857
+
858
+ [`EAvailableNetworks`](enums/EAvailableNetworks.md)[]
859
+
860
+ #### Defined in
861
+
862
+ [utils/wallet.ts:207](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L207)
863
+
864
+ ___
865
+
866
+ ### constructByteCountParam
867
+
868
+ ▸ **constructByteCountParam**(`addresses`, `increaseAddressCount?`): [`TGetByteCountInputs`](README.md#tgetbytecountinputs) \| [`TGetByteCountOutputs`](README.md#tgetbytecountoutputs)
869
+
870
+ Constructs the parameter for getByteCount via an array of addresses.
871
+
872
+ #### Parameters
873
+
874
+ | Name | Type | Default value |
875
+ | :------ | :------ | :------ |
876
+ | `addresses` | `string`[] | `undefined` |
877
+ | `increaseAddressCount` | \{ `addrType`: [`EAddressType`](enums/EAddressType.md) ; `count`: `number` }[] | `[]` |
878
+
879
+ #### Returns
880
+
881
+ [`TGetByteCountInputs`](README.md#tgetbytecountinputs) \| [`TGetByteCountOutputs`](README.md#tgetbytecountoutputs)
882
+
883
+ y
884
+
885
+ #### Defined in
886
+
887
+ [utils/transaction.ts:147](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/transaction.ts#L147)
888
+
889
+ ___
890
+
891
+ ### decodeOpReturnMessage
892
+
893
+ ▸ **decodeOpReturnMessage**(`opReturn?`): `string`[]
894
+
895
+ #### Parameters
896
+
897
+ | Name | Type | Default value |
898
+ | :------ | :------ | :------ |
899
+ | `opReturn` | `string` | `''` |
900
+
901
+ #### Returns
902
+
903
+ `string`[]
904
+
905
+ #### Defined in
906
+
907
+ [utils/wallet.ts:262](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L262)
908
+
909
+ ___
910
+
911
+ ### decodeRawTransaction
912
+
913
+ ▸ **decodeRawTransaction**(`hex`, `_network?`): [`Result`](README.md#result)\<[`TDecodeRawTx`](README.md#tdecoderawtx)\>
914
+
915
+ Attempts to decode a raw tx hex.
916
+ Source: https://github.com/bitcoinjs/bitcoinjs-lib/issues/1606#issuecomment-664740672
917
+
918
+ #### Parameters
919
+
920
+ | Name | Type |
921
+ | :------ | :------ |
922
+ | `hex` | `string` |
923
+ | `_network?` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
924
+
925
+ #### Returns
926
+
927
+ [`Result`](README.md#result)\<[`TDecodeRawTx`](README.md#tdecoderawtx)\>
928
+
929
+ #### Defined in
930
+
931
+ [utils/transaction.ts:373](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/transaction.ts#L373)
932
+
933
+ ___
934
+
935
+ ### err
936
+
937
+ ▸ **err**\<`T`\>(`error`): `Err`\<`T`\>
938
+
939
+ Construct a new Err result value.
940
+
941
+ #### Type parameters
942
+
943
+ | Name |
944
+ | :------ |
945
+ | `T` |
946
+
947
+ #### Parameters
948
+
949
+ | Name | Type | Description |
950
+ | :------ | :------ | :------ |
951
+ | `error` | `string` \| `Error` | The error message or Error object to be wrapped in an Err result. |
952
+
953
+ #### Returns
954
+
955
+ `Err`\<`T`\>
956
+
957
+ An Err result containing the given error.
958
+
959
+ #### Defined in
960
+
961
+ [utils/result.ts:74](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/result.ts#L74)
962
+
963
+ ___
964
+
965
+ ### formatKeyDerivationPath
966
+
967
+ ▸ **formatKeyDerivationPath**(`«destructured»`): [`Result`](README.md#result)\<[`IKeyDerivationPathData`](interfaces/IKeyDerivationPathData.md)\>
968
+
969
+ Formats and returns the provided derivation path string and object.
970
+
971
+ #### Parameters
972
+
973
+ | Name | Type |
974
+ | :------ | :------ |
975
+ | `«destructured»` | `Object` |
976
+ | › `addressType?` | [`EAddressType`](enums/EAddressType.md) |
977
+ | › `changeAddress?` | `boolean` |
978
+ | › `index?` | `string` |
979
+ | › `network` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
980
+ | › `path` | `string` \| [`IKeyDerivationPath`](interfaces/IKeyDerivationPath.md) |
981
+ | › `purpose?` | `string` |
982
+
983
+ #### Returns
984
+
985
+ [`Result`](README.md#result)\<[`IKeyDerivationPathData`](interfaces/IKeyDerivationPathData.md)\>
986
+
987
+ Derivation Path Data
988
+
989
+ #### Defined in
990
+
991
+ [utils/wallet.ts:75](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L75)
992
+
993
+ ___
994
+
995
+ ### formatPeerData
996
+
997
+ ▸ **formatPeerData**(`data`): [`Result`](README.md#result)\<[`IFormattedPeerData`](interfaces/IFormattedPeerData.md)\>
998
+
999
+ Formats the peer data response from an Electrum server.
1000
+
1001
+ #### Parameters
1002
+
1003
+ | Name | Type |
1004
+ | :------ | :------ |
1005
+ | `data` | [`string`, `string`, [`string`, `string`, `string`]] |
1006
+
1007
+ #### Returns
1008
+
1009
+ [`Result`](README.md#result)\<[`IFormattedPeerData`](interfaces/IFormattedPeerData.md)\>
1010
+
1011
+ Result<IFormattedPeerData>
1012
+
1013
+ #### Defined in
1014
+
1015
+ [utils/electrum.ts:59](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/electrum.ts#L59)
1016
+
1017
+ ___
1018
+
1019
+ ### generateMnemonic
1020
+
1021
+ ▸ **generateMnemonic**(`strength?`, `rng?`, `wordlist?`): `string`
1022
+
1023
+ Extends bip39's generateMnemonic function.
1024
+
1025
+ #### Parameters
1026
+
1027
+ | Name | Type |
1028
+ | :------ | :------ |
1029
+ | `strength?` | `number` |
1030
+ | `rng?` | (`size`: `number`) => `Buffer` |
1031
+ | `wordlist?` | `string`[] |
1032
+
1033
+ #### Returns
1034
+
1035
+ `string`
1036
+
1037
+ #### Defined in
1038
+
1039
+ [utils/helpers.ts:150](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/helpers.ts#L150)
1040
+
1041
+ ___
1042
+
1043
+ ### generateWalletId
1044
+
1045
+ ▸ **generateWalletId**(`seed`): `string`
1046
+
1047
+ #### Parameters
1048
+
1049
+ | Name | Type |
1050
+ | :------ | :------ |
1051
+ | `seed` | `Buffer` |
1052
+
1053
+ #### Returns
1054
+
1055
+ `string`
1056
+
1057
+ #### Defined in
1058
+
1059
+ [utils/wallet.ts:310](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L310)
1060
+
1061
+ ___
1062
+
1063
+ ### getAddressFromScriptPubKey
1064
+
1065
+ ▸ **getAddressFromScriptPubKey**(`scriptPubKey`, `selectedNetwork`): `string`
1066
+
1067
+ Get address for a given scriptPubKey.
1068
+
1069
+ #### Parameters
1070
+
1071
+ | Name | Type |
1072
+ | :------ | :------ |
1073
+ | `scriptPubKey` | `string` |
1074
+ | `selectedNetwork` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1075
+
1076
+ #### Returns
1077
+
1078
+ `string`
1079
+
1080
+ #### Defined in
1081
+
1082
+ [utils/helpers.ts:16](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/helpers.ts#L16)
1083
+
1084
+ ___
1085
+
1086
+ ### getAddressTypeFromPath
1087
+
1088
+ ▸ **getAddressTypeFromPath**(`path`): [`Result`](README.md#result)\<[`EAddressType`](enums/EAddressType.md)\>
1089
+
1090
+ Returns the address type from the specified derivation path.
1091
+
1092
+ #### Parameters
1093
+
1094
+ | Name | Type |
1095
+ | :------ | :------ |
1096
+ | `path` | `string` \| [`IKeyDerivationPath`](interfaces/IKeyDerivationPath.md) |
1097
+
1098
+ #### Returns
1099
+
1100
+ [`Result`](README.md#result)\<[`EAddressType`](enums/EAddressType.md)\>
1101
+
1102
+ #### Defined in
1103
+
1104
+ [utils/derivation-path.ts:147](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/derivation-path.ts#L147)
1105
+
1106
+ ___
1107
+
1108
+ ### getByteCount
1109
+
1110
+ ▸ **getByteCount**(`inputs`, `outputs`, `message?`): `number`
1111
+
1112
+ #### Parameters
1113
+
1114
+ | Name | Type |
1115
+ | :------ | :------ |
1116
+ | `inputs` | [`TGetByteCountInputs`](README.md#tgetbytecountinputs) |
1117
+ | `outputs` | [`TGetByteCountOutputs`](README.md#tgetbytecountoutputs) |
1118
+ | `message?` | `string` |
1119
+
1120
+ #### Returns
1121
+
1122
+ `number`
1123
+
1124
+ #### Defined in
1125
+
1126
+ [utils/transaction.ts:181](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/transaction.ts#L181)
1127
+
1128
+ ___
1129
+
1130
+ ### getDataFallback
1131
+
1132
+ ▸ **getDataFallback**\<`K`\>(`key`): `Promise`\<[`Result`](README.md#result)\<[`IWalletData`](interfaces/IWalletData.md)[`K`]\>\>
1133
+
1134
+ #### Type parameters
1135
+
1136
+ | Name | Type |
1137
+ | :------ | :------ |
1138
+ | `K` | extends keyof [`IWalletData`](interfaces/IWalletData.md) |
1139
+
1140
+ #### Parameters
1141
+
1142
+ | Name | Type |
1143
+ | :------ | :------ |
1144
+ | `key` | `string` |
1145
+
1146
+ #### Returns
1147
+
1148
+ `Promise`\<[`Result`](README.md#result)\<[`IWalletData`](interfaces/IWalletData.md)[`K`]\>\>
1149
+
1150
+ #### Defined in
1151
+
1152
+ [types/wallet.ts:173](https://github.com/synonymdev/beignet/blob/7c83290/src/types/wallet.ts#L173)
1153
+
1154
+ ___
1155
+
1156
+ ### getDefaultPort
1157
+
1158
+ ▸ **getDefaultPort**(`selectedNetwork?`, `protocol?`): `number`
1159
+
1160
+ Returns the default port for the given network and protocol.
1161
+
1162
+ #### Parameters
1163
+
1164
+ | Name | Type |
1165
+ | :------ | :------ |
1166
+ | `selectedNetwork?` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1167
+ | `protocol?` | [`TProtocol`](README.md#tprotocol) |
1168
+
1169
+ #### Returns
1170
+
1171
+ `number`
1172
+
1173
+ #### Defined in
1174
+
1175
+ [utils/electrum.ts:22](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/electrum.ts#L22)
1176
+
1177
+ ___
1178
+
1179
+ ### getDefaultWalletData
1180
+
1181
+ ▸ **getDefaultWalletData**(): [`IWalletData`](interfaces/IWalletData.md)
1182
+
1183
+ Returns the default wallet data object.
1184
+
1185
+ #### Returns
1186
+
1187
+ [`IWalletData`](interfaces/IWalletData.md)
1188
+
1189
+ #### Defined in
1190
+
1191
+ [utils/wallet.ts:34](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L34)
1192
+
1193
+ ___
1194
+
1195
+ ### getDefaultWalletDataKeys
1196
+
1197
+ ▸ **getDefaultWalletDataKeys**(): keyof [`IWalletData`](interfaces/IWalletData.md)[]
1198
+
1199
+ Returns the keys from the default wallet data object.
1200
+
1201
+ #### Returns
1202
+
1203
+ keyof [`IWalletData`](interfaces/IWalletData.md)[]
1204
+
1205
+ #### Defined in
1206
+
1207
+ [utils/wallet.ts:42](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L42)
1208
+
1209
+ ___
1210
+
1211
+ ### getExchangeRates
1212
+
1213
+ ▸ **getExchangeRates**(): `Promise`\<[`Result`](README.md#result)\<[`IExchangeRates`](interfaces/IExchangeRates.md)\>\>
1214
+
1215
+ Returns the exchange rate for the given currency
1216
+
1217
+ #### Returns
1218
+
1219
+ `Promise`\<[`Result`](README.md#result)\<[`IExchangeRates`](interfaces/IExchangeRates.md)\>\>
1220
+
1221
+ #### Defined in
1222
+
1223
+ [utils/exchange-rate.ts:45](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/exchange-rate.ts#L45)
1224
+
1225
+ ___
1226
+
1227
+ ### getHighestUsedIndexFromTxHashes
1228
+
1229
+ ▸ **getHighestUsedIndexFromTxHashes**(`«destructured»`): [`Result`](README.md#result)\<[`IIndexes`](interfaces/IIndexes.md)\>
1230
+
1231
+ Returns the highest used index from the provided txHashes.
1232
+
1233
+ #### Parameters
1234
+
1235
+ | Name | Type |
1236
+ | :------ | :------ |
1237
+ | `«destructured»` | `Object` |
1238
+ | › `addressIndex` | [`IAddress`](interfaces/IAddress.md) |
1239
+ | › `addresses` | [`IAddresses`](interfaces/IAddresses.md) |
1240
+ | › `changeAddressIndex` | [`IAddress`](interfaces/IAddress.md) |
1241
+ | › `changeAddresses` | [`IAddresses`](interfaces/IAddresses.md) |
1242
+ | › `txHashes` | [`ITxHashes`](interfaces/ITxHashes.md)[] |
1243
+
1244
+ #### Returns
1245
+
1246
+ [`Result`](README.md#result)\<[`IIndexes`](interfaces/IIndexes.md)\>
1247
+
1248
+ #### Defined in
1249
+
1250
+ [utils/wallet.ts:133](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L133)
1251
+
1252
+ ___
1253
+
1254
+ ### getKeyDerivationPath
1255
+
1256
+ ▸ **getKeyDerivationPath**(`«destructured»`): [`Result`](README.md#result)\<[`IKeyDerivationPath`](interfaces/IKeyDerivationPath.md)\>
1257
+
1258
+ Returns the derivation path object for the specified addressType and network.
1259
+
1260
+ #### Parameters
1261
+
1262
+ | Name | Type |
1263
+ | :------ | :------ |
1264
+ | `«destructured»` | `Object` |
1265
+ | › `addressType` | [`EAddressType`](enums/EAddressType.md) |
1266
+ | › `network` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1267
+
1268
+ #### Returns
1269
+
1270
+ [`Result`](README.md#result)\<[`IKeyDerivationPath`](interfaces/IKeyDerivationPath.md)\>
1271
+
1272
+ Result<IKeyDerivationPath>
1273
+
1274
+ #### Defined in
1275
+
1276
+ [utils/helpers.ts:98](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/helpers.ts#L98)
1277
+
1278
+ ___
1279
+
1280
+ ### getKeyDerivationPathObject
1281
+
1282
+ ▸ **getKeyDerivationPathObject**(`«destructured»`): [`Result`](README.md#result)\<[`IKeyDerivationPath`](interfaces/IKeyDerivationPath.md)\>
1283
+
1284
+ Parses a key derivation path in string format Ex: "m/84'/0'/0'/0/0" and returns IKeyDerivationPath.
1285
+
1286
+ #### Parameters
1287
+
1288
+ | Name | Type |
1289
+ | :------ | :------ |
1290
+ | `«destructured»` | `Object` |
1291
+ | › `changeAddress?` | `boolean` |
1292
+ | › `index?` | `string` |
1293
+ | › `network` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1294
+ | › `path` | `string` |
1295
+ | › `purpose?` | `string` |
1296
+
1297
+ #### Returns
1298
+
1299
+ [`Result`](README.md#result)\<[`IKeyDerivationPath`](interfaces/IKeyDerivationPath.md)\>
1300
+
1301
+ #### Defined in
1302
+
1303
+ [utils/derivation-path.ts:22](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/derivation-path.ts#L22)
1304
+
1305
+ ___
1306
+
1307
+ ### getKeyDerivationPathString
1308
+
1309
+ ▸ **getKeyDerivationPathString**(`«destructured»`): [`Result`](README.md#result)\<`string`\>
1310
+
1311
+ Parses a key derivation path object and returns it in string format. Ex: "m/84'/0'/0'/0/0"
1312
+
1313
+ #### Parameters
1314
+
1315
+ | Name | Type |
1316
+ | :------ | :------ |
1317
+ | `«destructured»` | `Object` |
1318
+ | › `accountType?` | `string` \| `number` |
1319
+ | › `addressType` | [`EAddressType`](enums/EAddressType.md) |
1320
+ | › `changeAddress?` | `boolean` |
1321
+ | › `index?` | `string` \| `number` |
1322
+ | › `network` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1323
+ | › `path?` | [`IKeyDerivationPath`](interfaces/IKeyDerivationPath.md) |
1324
+ | › `purpose?` | `string` |
1325
+
1326
+ #### Returns
1327
+
1328
+ [`Result`](README.md#result)\<`string`\>
1329
+
1330
+ #### Defined in
1331
+
1332
+ [utils/derivation-path.ts:80](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/derivation-path.ts#L80)
1333
+
1334
+ ___
1335
+
1336
+ ### getKeyValue
1337
+
1338
+ ▸ **getKeyValue**(`key`): `string`
1339
+
1340
+ Returns last value between hyphens in a string.
1341
+
1342
+ #### Parameters
1343
+
1344
+ | Name | Type |
1345
+ | :------ | :------ |
1346
+ | `key` | `string` |
1347
+
1348
+ #### Returns
1349
+
1350
+ `string`
1351
+
1352
+ #### Defined in
1353
+
1354
+ [utils/wallet.ts:51](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L51)
1355
+
1356
+ ___
1357
+
1358
+ ### getPeers
1359
+
1360
+ ▸ **getPeers**(`selectedNetwork?`): `Promise`\<[`Result`](README.md#result)\<[`IFormattedPeerData`](interfaces/IFormattedPeerData.md)[]\>\>
1361
+
1362
+ Returns an array of peers.
1363
+ If unable to acquire peers from an Electrum server the method will default to the hardcoded peers in peers.json.
1364
+
1365
+ #### Parameters
1366
+
1367
+ | Name | Type |
1368
+ | :------ | :------ |
1369
+ | `selectedNetwork?` | `Object` |
1370
+ | `selectedNetwork.selectedNetwork` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1371
+
1372
+ #### Returns
1373
+
1374
+ `Promise`\<[`Result`](README.md#result)\<[`IFormattedPeerData`](interfaces/IFormattedPeerData.md)[]\>\>
1375
+
1376
+ Promise<Result<IFormattedPeerData[]>>
1377
+
1378
+ #### Defined in
1379
+
1380
+ [utils/electrum.ts:95](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/electrum.ts#L95)
1381
+
1382
+ ___
1383
+
1384
+ ### getProtocolForPort
1385
+
1386
+ ▸ **getProtocolForPort**(`port?`, `network?`): `undefined` \| [`TProtocol`](README.md#tprotocol)
1387
+
1388
+ Returns the protocol for the given network and default port.
1389
+
1390
+ #### Parameters
1391
+
1392
+ | Name | Type |
1393
+ | :------ | :------ |
1394
+ | `port?` | `string` |
1395
+ | `network?` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1396
+
1397
+ #### Returns
1398
+
1399
+ `undefined` \| [`TProtocol`](README.md#tprotocol)
1400
+
1401
+ #### Defined in
1402
+
1403
+ [utils/electrum.ts:39](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/electrum.ts#L39)
1404
+
1405
+ ___
1406
+
1407
+ ### getScriptHash
1408
+
1409
+ ▸ **getScriptHash**(`«destructured»`): `string`
1410
+
1411
+ Get scriptHash for a given address
1412
+
1413
+ #### Parameters
1414
+
1415
+ | Name | Type |
1416
+ | :------ | :------ |
1417
+ | `«destructured»` | `Object` |
1418
+ | › `address` | `string` |
1419
+ | › `network` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1420
+
1421
+ #### Returns
1422
+
1423
+ `string`
1424
+
1425
+ #### Defined in
1426
+
1427
+ [utils/helpers.ts:125](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/helpers.ts#L125)
1428
+
1429
+ ___
1430
+
1431
+ ### getSeed
1432
+
1433
+ ▸ **getSeed**(`mnemonic`, `bip39Passphrase`): `Buffer`
1434
+
1435
+ Returns the seed for a given mnemonic and passphrase.
1436
+
1437
+ #### Parameters
1438
+
1439
+ | Name | Type |
1440
+ | :------ | :------ |
1441
+ | `mnemonic` | `any` |
1442
+ | `bip39Passphrase` | `any` |
1443
+
1444
+ #### Returns
1445
+
1446
+ `Buffer`
1447
+
1448
+ #### Defined in
1449
+
1450
+ [utils/wallet.ts:295](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L295)
1451
+
1452
+ ___
1453
+
1454
+ ### getSeedHash
1455
+
1456
+ ▸ **getSeedHash**(`seed`): `string`
1457
+
1458
+ Returns the seed hash for a given mnemonic and passphrase.
1459
+
1460
+ #### Parameters
1461
+
1462
+ | Name | Type |
1463
+ | :------ | :------ |
1464
+ | `seed` | `Buffer` |
1465
+
1466
+ #### Returns
1467
+
1468
+ `string`
1469
+
1470
+ #### Defined in
1471
+
1472
+ [utils/wallet.ts:304](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L304)
1473
+
1474
+ ___
1475
+
1476
+ ### getSha256
1477
+
1478
+ ▸ **getSha256**(`str`): `string`
1479
+
1480
+ Get sha256 hash of a given string.
1481
+
1482
+ #### Parameters
1483
+
1484
+ | Name | Type |
1485
+ | :------ | :------ |
1486
+ | `str` | `string` |
1487
+
1488
+ #### Returns
1489
+
1490
+ `string`
1491
+
1492
+ #### Defined in
1493
+
1494
+ [utils/helpers.ts:32](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/helpers.ts#L32)
1495
+
1496
+ ___
1497
+
1498
+ ### getStorageKeyValues
1499
+
1500
+ ▸ **getStorageKeyValues**(`storageKey`): `Object`
1501
+
1502
+ #### Parameters
1503
+
1504
+ | Name | Type |
1505
+ | :------ | :------ |
1506
+ | `storageKey` | `string` |
1507
+
1508
+ #### Returns
1509
+
1510
+ `Object`
1511
+
1512
+ | Name | Type |
1513
+ | :------ | :------ |
1514
+ | `network` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1515
+ | `value` | keyof [`IWalletData`](interfaces/IWalletData.md) |
1516
+ | `walletName` | `string` |
1517
+
1518
+ #### Defined in
1519
+
1520
+ [utils/wallet.ts:324](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L324)
1521
+
1522
+ ___
1523
+
1524
+ ### getTxFee
1525
+
1526
+ ▸ **getTxFee**(`«destructured»`): `number`
1527
+
1528
+ Returns the total fee in sats for a transaction at a given size (transactionByteCount) times the desired satsPerByte.
1529
+
1530
+ #### Parameters
1531
+
1532
+ | Name | Type |
1533
+ | :------ | :------ |
1534
+ | `«destructured»` | `Object` |
1535
+ | › `satsPerByte` | `number` |
1536
+ | › `transactionByteCount` | `number` |
1537
+
1538
+ #### Returns
1539
+
1540
+ `number`
1541
+
1542
+ #### Defined in
1543
+
1544
+ [utils/wallet.ts:345](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L345)
1545
+
1546
+ ___
1547
+
1548
+ ### getWalletDataStorageKey
1549
+
1550
+ ▸ **getWalletDataStorageKey**(`name`, `network`, `key`): `string`
1551
+
1552
+ #### Parameters
1553
+
1554
+ | Name | Type |
1555
+ | :------ | :------ |
1556
+ | `name` | `string` |
1557
+ | `network` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1558
+ | `key` | keyof [`IWalletData`](interfaces/IWalletData.md) |
1559
+
1560
+ #### Returns
1561
+
1562
+ `string`
1563
+
1564
+ #### Defined in
1565
+
1566
+ [utils/wallet.ts:316](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L316)
1567
+
1568
+ ___
1569
+
1570
+ ### isValidBech32mEncodedString
1571
+
1572
+ ▸ **isValidBech32mEncodedString**(`address`): `Object`
1573
+
1574
+ Returns if the provided string is a valid Bech32m encoded string (taproot/p2tr address).
1575
+
1576
+ #### Parameters
1577
+
1578
+ | Name | Type |
1579
+ | :------ | :------ |
1580
+ | `address` | `string` |
1581
+
1582
+ #### Returns
1583
+
1584
+ `Object`
1585
+
1586
+ | Name | Type |
1587
+ | :------ | :------ |
1588
+ | `isValid` | `boolean` |
1589
+ | `network` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1590
+
1591
+ #### Defined in
1592
+
1593
+ [utils/wallet.ts:185](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L185)
1594
+
1595
+ ___
1596
+
1597
+ ### objectKeys
1598
+
1599
+ ▸ **objectKeys**\<`Type`\>(`value`): \`$\{Exclude\<keyof Type, symbol\>}\`[]
1600
+
1601
+ Returns the keys of a given object.
1602
+
1603
+ #### Type parameters
1604
+
1605
+ | Name | Type |
1606
+ | :------ | :------ |
1607
+ | `Type` | extends `object` |
1608
+
1609
+ #### Parameters
1610
+
1611
+ | Name | Type |
1612
+ | :------ | :------ |
1613
+ | `value` | `Type` |
1614
+
1615
+ #### Returns
1616
+
1617
+ \`$\{Exclude\<keyof Type, symbol\>}\`[]
1618
+
1619
+ #### Defined in
1620
+
1621
+ [utils/wallet.ts:62](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L62)
1622
+
1623
+ ___
1624
+
1625
+ ### objectsMatch
1626
+
1627
+ ▸ **objectsMatch**(`obj1`, `obj2`): `boolean`
1628
+
1629
+ Determines if the two objects passed as params match.
1630
+
1631
+ #### Parameters
1632
+
1633
+ | Name | Type |
1634
+ | :------ | :------ |
1635
+ | `obj1` | `any` |
1636
+ | `obj2` | `any` |
1637
+
1638
+ #### Returns
1639
+
1640
+ `boolean`
1641
+
1642
+ boolean
1643
+
1644
+ #### Defined in
1645
+
1646
+ [utils/helpers.ts:177](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/helpers.ts#L177)
1647
+
1648
+ ___
1649
+
1650
+ ### ok
1651
+
1652
+ ▸ **ok**\<`T`\>(`value`): `Ok`\<`T`\>
1653
+
1654
+ Construct a new Ok result value.
1655
+
1656
+ #### Type parameters
1657
+
1658
+ | Name |
1659
+ | :------ |
1660
+ | `T` |
1661
+
1662
+ #### Parameters
1663
+
1664
+ | Name | Type | Description |
1665
+ | :------ | :------ | :------ |
1666
+ | `value` | `T` | The value to be wrapped in an Ok result. |
1667
+
1668
+ #### Returns
1669
+
1670
+ `Ok`\<`T`\>
1671
+
1672
+ An Ok result containing the given value.
1673
+
1674
+ #### Defined in
1675
+
1676
+ [utils/result.ts:67](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/result.ts#L67)
1677
+
1678
+ ___
1679
+
1680
+ ### parseOnChainPaymentRequest
1681
+
1682
+ ▸ **parseOnChainPaymentRequest**(`data`, `network?`): [`Result`](README.md#result)\<\{ `address`: `string` ; `message`: `string` ; `network`: [`EAvailableNetworks`](enums/EAvailableNetworks.md) ; `sats`: `number` }\>
1683
+
1684
+ #### Parameters
1685
+
1686
+ | Name | Type |
1687
+ | :------ | :------ |
1688
+ | `data` | `string` |
1689
+ | `network?` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1690
+
1691
+ #### Returns
1692
+
1693
+ [`Result`](README.md#result)\<\{ `address`: `string` ; `message`: `string` ; `network`: [`EAvailableNetworks`](enums/EAvailableNetworks.md) ; `sats`: `number` }\>
1694
+
1695
+ #### Defined in
1696
+
1697
+ [utils/transaction.ts:64](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/transaction.ts#L64)
1698
+
1699
+ ___
1700
+
1701
+ ### reduceValue
1702
+
1703
+ ▸ **reduceValue**\<`T`\>(`«destructured»`): [`Result`](README.md#result)\<`number`\>
1704
+
1705
+ Sum a specific value in an array of objects.
1706
+
1707
+ #### Type parameters
1708
+
1709
+ | Name |
1710
+ | :------ |
1711
+ | `T` |
1712
+
1713
+ #### Parameters
1714
+
1715
+ | Name | Type |
1716
+ | :------ | :------ |
1717
+ | `«destructured»` | `Object` |
1718
+ | › `arr` | `T`[] |
1719
+ | › `value` | keyof `T` |
1720
+
1721
+ #### Returns
1722
+
1723
+ [`Result`](README.md#result)\<`number`\>
1724
+
1725
+ #### Defined in
1726
+
1727
+ [utils/wallet.ts:216](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L216)
1728
+
1729
+ ___
1730
+
1731
+ ### removeDustOutputs
1732
+
1733
+ ▸ **removeDustOutputs**(`outputs`): [`IOutput`](interfaces/IOutput.md)[]
1734
+
1735
+ Removes outputs that are below the dust limit.
1736
+
1737
+ #### Parameters
1738
+
1739
+ | Name | Type |
1740
+ | :------ | :------ |
1741
+ | `outputs` | [`IOutput`](interfaces/IOutput.md)[] |
1742
+
1743
+ #### Returns
1744
+
1745
+ [`IOutput`](interfaces/IOutput.md)[]
1746
+
1747
+ #### Defined in
1748
+
1749
+ [utils/transaction.ts:293](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/transaction.ts#L293)
1750
+
1751
+ ___
1752
+
1753
+ ### setReplaceByFee
1754
+
1755
+ ▸ **setReplaceByFee**(`«destructured»`): `void`
1756
+
1757
+ Sets RBF for the provided psbt.
1758
+
1759
+ #### Parameters
1760
+
1761
+ | Name | Type |
1762
+ | :------ | :------ |
1763
+ | `«destructured»` | `Object` |
1764
+ | › `psbt` | `Psbt` |
1765
+ | › `setRbf` | `boolean` |
1766
+
1767
+ #### Returns
1768
+
1769
+ `void`
1770
+
1771
+ #### Defined in
1772
+
1773
+ [utils/transaction.ts:28](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/transaction.ts#L28)
1774
+
1775
+ ___
1776
+
1777
+ ### shuffleArray
1778
+
1779
+ ▸ **shuffleArray**\<`T`\>(`array`): `T`[]
1780
+
1781
+ Shuffles a given array.
1782
+
1783
+ #### Type parameters
1784
+
1785
+ | Name |
1786
+ | :------ |
1787
+ | `T` |
1788
+
1789
+ #### Parameters
1790
+
1791
+ | Name | Type |
1792
+ | :------ | :------ |
1793
+ | `array` | `T`[] |
1794
+
1795
+ #### Returns
1796
+
1797
+ `T`[]
1798
+
1799
+ #### Defined in
1800
+
1801
+ [utils/wallet.ts:242](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/wallet.ts#L242)
1802
+
1803
+ ___
1804
+
1805
+ ### validateAddress
1806
+
1807
+ ▸ **validateAddress**(`«destructured»`): `Object`
1808
+
1809
+ Validate address for a given network.
1810
+ If no address is provided, it will attempt to validate the address for all available networks.
1811
+
1812
+ #### Parameters
1813
+
1814
+ | Name | Type |
1815
+ | :------ | :------ |
1816
+ | `«destructured»` | `Object` |
1817
+ | › `address` | `string` |
1818
+ | › `network?` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1819
+
1820
+ #### Returns
1821
+
1822
+ `Object`
1823
+
1824
+ | Name | Type |
1825
+ | :------ | :------ |
1826
+ | `isValid` | `boolean` |
1827
+ | `network` | [`EAvailableNetworks`](enums/EAvailableNetworks.md) |
1828
+
1829
+ #### Defined in
1830
+
1831
+ [utils/helpers.ts:45](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/helpers.ts#L45)
1832
+
1833
+ ___
1834
+
1835
+ ### validateMnemonic
1836
+
1837
+ ▸ **validateMnemonic**(`mnemonic?`): `boolean`
1838
+
1839
+ Attempts to validate the provided mnemonic.
1840
+
1841
+ #### Parameters
1842
+
1843
+ | Name | Type | Default value |
1844
+ | :------ | :------ | :------ |
1845
+ | `mnemonic` | `string` | `''` |
1846
+
1847
+ #### Returns
1848
+
1849
+ `boolean`
1850
+
1851
+ #### Defined in
1852
+
1853
+ [utils/helpers.ts:163](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/helpers.ts#L163)
1854
+
1855
+ ___
1856
+
1857
+ ### validateTransaction
1858
+
1859
+ ▸ **validateTransaction**(`transaction`): [`Result`](README.md#result)\<`string`\>
1860
+
1861
+ Used to validate transaction form data.
1862
+
1863
+ #### Parameters
1864
+
1865
+ | Name | Type |
1866
+ | :------ | :------ |
1867
+ | `transaction` | [`ISendTransaction`](interfaces/ISendTransaction.md) |
1868
+
1869
+ #### Returns
1870
+
1871
+ [`Result`](README.md#result)\<`string`\>
1872
+
1873
+ #### Defined in
1874
+
1875
+ [utils/transaction.ts:304](https://github.com/synonymdev/beignet/blob/7c83290/src/utils/transaction.ts#L304)