@keep-network/tbtc-v2 0.1.0 → 0.1.1-dev

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 (296) hide show
  1. package/README.adoc +12 -0
  2. package/artifacts/.chainId +1 -1
  3. package/artifacts/Bank.json +807 -0
  4. package/artifacts/Bridge.json +2300 -0
  5. package/artifacts/Deposit.json +117 -0
  6. package/artifacts/DepositSweep.json +77 -0
  7. package/artifacts/EcdsaDkgValidator.json +532 -0
  8. package/artifacts/EcdsaInactivity.json +156 -0
  9. package/artifacts/EcdsaSortitionPool.json +1004 -0
  10. package/artifacts/Fraud.json +164 -0
  11. package/artifacts/KeepRegistry.json +99 -0
  12. package/artifacts/KeepStake.json +286 -0
  13. package/artifacts/KeepToken.json +711 -0
  14. package/artifacts/KeepTokenStaking.json +483 -0
  15. package/artifacts/MovingFunds.json +249 -0
  16. package/artifacts/NuCypherStakingEscrow.json +256 -0
  17. package/artifacts/NuCypherToken.json +711 -0
  18. package/artifacts/RandomBeaconStub.json +141 -0
  19. package/artifacts/Redemption.json +174 -0
  20. package/artifacts/ReimbursementPool.json +509 -0
  21. package/artifacts/Relay.json +123 -0
  22. package/artifacts/T.json +1148 -0
  23. package/artifacts/TBTC.json +36 -35
  24. package/artifacts/TBTCToken.json +738 -0
  25. package/artifacts/TBTCVault.json +691 -0
  26. package/artifacts/TokenStaking.json +2288 -0
  27. package/artifacts/TokenholderGovernor.json +1795 -0
  28. package/artifacts/TokenholderTimelock.json +1058 -0
  29. package/artifacts/VendingMachine.json +34 -33
  30. package/artifacts/VendingMachineKeep.json +400 -0
  31. package/artifacts/VendingMachineNuCypher.json +400 -0
  32. package/artifacts/WalletRegistry.json +1843 -0
  33. package/artifacts/WalletRegistryGovernance.json +2754 -0
  34. package/artifacts/Wallets.json +186 -0
  35. package/artifacts/solcInputs/5e62cff1ead0900b07facca4b559e818.json +314 -0
  36. package/build/contracts/GovernanceUtils.sol/GovernanceUtils.dbg.json +1 -1
  37. package/build/contracts/GovernanceUtils.sol/GovernanceUtils.json +2 -2
  38. package/build/contracts/bank/Bank.sol/Bank.dbg.json +4 -0
  39. package/build/contracts/bank/Bank.sol/Bank.json +542 -0
  40. package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.dbg.json +4 -0
  41. package/build/contracts/bank/IReceiveBalanceApproval.sol/IReceiveBalanceApproval.json +34 -0
  42. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.dbg.json +4 -0
  43. package/build/contracts/bridge/BitcoinTx.sol/BitcoinTx.json +10 -0
  44. package/build/contracts/bridge/Bridge.sol/Bridge.dbg.json +4 -0
  45. package/build/contracts/bridge/Bridge.sol/Bridge.json +2686 -0
  46. package/build/contracts/bridge/BridgeState.sol/BridgeState.dbg.json +4 -0
  47. package/build/contracts/bridge/BridgeState.sol/BridgeState.json +226 -0
  48. package/build/contracts/bridge/Deposit.sol/Deposit.dbg.json +4 -0
  49. package/build/contracts/bridge/Deposit.sol/Deposit.json +72 -0
  50. package/build/contracts/bridge/DepositSweep.sol/DepositSweep.dbg.json +4 -0
  51. package/build/contracts/bridge/DepositSweep.sol/DepositSweep.json +30 -0
  52. package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.dbg.json +4 -0
  53. package/build/contracts/bridge/EcdsaLib.sol/EcdsaLib.json +10 -0
  54. package/build/contracts/bridge/Fraud.sol/Fraud.dbg.json +4 -0
  55. package/build/contracts/bridge/Fraud.sol/Fraud.json +86 -0
  56. package/build/contracts/bridge/Heartbeat.sol/Heartbeat.dbg.json +4 -0
  57. package/build/contracts/bridge/Heartbeat.sol/Heartbeat.json +10 -0
  58. package/build/contracts/bridge/IRelay.sol/IRelay.dbg.json +4 -0
  59. package/build/contracts/bridge/IRelay.sol/IRelay.json +37 -0
  60. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.dbg.json +4 -0
  61. package/build/contracts/bridge/MovingFunds.sol/MovingFunds.json +138 -0
  62. package/build/contracts/bridge/Redemption.sol/OutboundTx.dbg.json +4 -0
  63. package/build/contracts/bridge/Redemption.sol/OutboundTx.json +10 -0
  64. package/build/contracts/bridge/Redemption.sol/Redemption.dbg.json +4 -0
  65. package/build/contracts/bridge/Redemption.sol/Redemption.json +92 -0
  66. package/build/contracts/bridge/VendingMachine.sol/VendingMachine.dbg.json +1 -1
  67. package/build/contracts/bridge/VendingMachine.sol/VendingMachine.json +2 -2
  68. package/build/contracts/bridge/Wallets.sol/Wallets.dbg.json +4 -0
  69. package/build/contracts/bridge/Wallets.sol/Wallets.json +112 -0
  70. package/build/contracts/token/TBTC.sol/TBTC.dbg.json +1 -1
  71. package/build/contracts/token/TBTC.sol/TBTC.json +4 -4
  72. package/build/contracts/vault/DonationVault.sol/DonationVault.dbg.json +4 -0
  73. package/build/contracts/vault/DonationVault.sol/DonationVault.json +108 -0
  74. package/build/contracts/vault/IVault.sol/IVault.dbg.json +4 -0
  75. package/build/contracts/vault/IVault.sol/IVault.json +52 -0
  76. package/build/contracts/vault/TBTCVault.sol/TBTCVault.dbg.json +4 -0
  77. package/build/contracts/vault/TBTCVault.sol/TBTCVault.json +449 -0
  78. package/contracts/GovernanceUtils.sol +4 -4
  79. package/contracts/bank/Bank.sol +436 -0
  80. package/contracts/bank/IReceiveBalanceApproval.sol +45 -0
  81. package/contracts/bridge/BitcoinTx.sol +326 -0
  82. package/contracts/bridge/Bridge.sol +1793 -0
  83. package/contracts/bridge/BridgeState.sol +739 -0
  84. package/contracts/bridge/Deposit.sol +269 -0
  85. package/contracts/bridge/DepositSweep.sol +574 -0
  86. package/contracts/bridge/EcdsaLib.sol +45 -0
  87. package/contracts/bridge/Fraud.sol +579 -0
  88. package/contracts/bridge/Heartbeat.sol +112 -0
  89. package/contracts/bridge/IRelay.sol +28 -0
  90. package/contracts/bridge/MovingFunds.sol +1077 -0
  91. package/contracts/bridge/Redemption.sol +1020 -0
  92. package/contracts/bridge/VendingMachine.sol +2 -2
  93. package/contracts/bridge/Wallets.sol +719 -0
  94. package/contracts/hardhat-dependency-compiler/.hardhat-dependency-compiler +1 -0
  95. package/contracts/hardhat-dependency-compiler/@keep-network/ecdsa/contracts/WalletRegistry.sol +3 -0
  96. package/contracts/hardhat-dependency-compiler/@openzeppelin/contracts/proxy/transparent/ProxyAdmin.sol +3 -0
  97. package/contracts/hardhat-dependency-compiler/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol +3 -0
  98. package/contracts/token/TBTC.sol +1 -1
  99. package/contracts/vault/DonationVault.sol +125 -0
  100. package/contracts/vault/IVault.sol +44 -0
  101. package/contracts/vault/TBTCVault.sol +305 -0
  102. package/deploy/00_resolve_relay.ts +28 -0
  103. package/deploy/00_resolve_tbtc_v1_token.ts +1 -1
  104. package/deploy/01_deploy_tbtc_v2_token.ts +8 -1
  105. package/deploy/02_deploy_vending_machine.ts +7 -0
  106. package/deploy/{03_transfer_roles.ts → 03_transfer_vending_machine_roles.ts} +1 -1
  107. package/deploy/04_deploy_bank.ts +27 -0
  108. package/deploy/05_deploy_bridge.ts +80 -0
  109. package/deploy/06_deploy_tbtc_vault.ts +30 -0
  110. package/deploy/07_bank_update_bridge.ts +19 -0
  111. package/deploy/08_transfer_bank_ownership.ts +15 -0
  112. package/deploy/09_transfer_tbtc_vault_ownership.ts +15 -0
  113. package/deploy/10_transfer_bridge_governance.ts +20 -0
  114. package/deploy/11_initialize_wallet_owner.ts +18 -0
  115. package/deploy/11_transfer_proxy_admin_ownership.ts +30 -0
  116. package/deploy/12_deploy_proxy_admin_with_deputy.ts +33 -0
  117. package/export/deploy/00_resolve_relay.js +24 -0
  118. package/export/deploy/00_resolve_tbtc_v1_token.js +24 -0
  119. package/export/deploy/01_deploy_tbtc_v2_token.js +19 -0
  120. package/export/deploy/02_deploy_vending_machine.js +25 -0
  121. package/export/deploy/03_transfer_vending_machine_roles.js +19 -0
  122. package/export/deploy/04_deploy_bank.js +21 -0
  123. package/export/deploy/05_deploy_bridge.js +69 -0
  124. package/export/deploy/06_deploy_tbtc_vault.js +24 -0
  125. package/export/deploy/07_bank_update_bridge.js +13 -0
  126. package/export/deploy/08_transfer_bank_ownership.js +11 -0
  127. package/export/deploy/09_transfer_tbtc_vault_ownership.js +11 -0
  128. package/export/deploy/10_transfer_bridge_governance.js +11 -0
  129. package/export/deploy/11_initialize_wallet_owner.js +14 -0
  130. package/export/deploy/11_transfer_proxy_admin_ownership.js +23 -0
  131. package/export/deploy/12_deploy_proxy_admin_with_deputy.js +22 -0
  132. package/export/hardhat.config.js +169 -0
  133. package/export/test/bank/Bank.test.js +1012 -0
  134. package/export/test/bridge/Bridge.Deployment.test.js +76 -0
  135. package/export/test/bridge/Bridge.Deposit.test.js +1834 -0
  136. package/export/test/bridge/Bridge.Frauds.test.js +1349 -0
  137. package/export/test/bridge/Bridge.MovingFunds.test.js +2437 -0
  138. package/export/test/bridge/Bridge.Parameters.test.js +400 -0
  139. package/export/test/bridge/Bridge.Redemption.test.js +2523 -0
  140. package/export/test/bridge/Bridge.Vaults.test.js +74 -0
  141. package/export/test/bridge/Bridge.Wallets.test.js +1017 -0
  142. package/export/test/bridge/EcdsaLib.test.js +46 -0
  143. package/export/test/bridge/Heartbeat.test.js +77 -0
  144. package/export/test/bridge/VendingMachine.Upgrade.test.js +160 -0
  145. package/export/test/bridge/VendingMachine.test.js +762 -0
  146. package/export/test/data/deposit-sweep.js +655 -0
  147. package/export/test/data/ecdsa.js +18 -0
  148. package/export/test/data/fraud.js +158 -0
  149. package/export/test/data/moving-funds.js +815 -0
  150. package/export/test/data/redemption.js +1011 -0
  151. package/export/test/fixtures/bridge.js +54 -0
  152. package/export/test/fixtures/index.js +57 -0
  153. package/export/test/helpers/contract-test-helpers.js +18 -0
  154. package/export/test/integration/Slashing.test.js +279 -0
  155. package/export/test/integration/WalleCreation.test.js +66 -0
  156. package/export/test/integration/utils/ecdsa-wallet-registry.js +137 -0
  157. package/export/test/integration/utils/fixture.js +77 -0
  158. package/export/test/integration/utils/gas.js +36 -0
  159. package/export/test/integration/utils/random-beacon.js +26 -0
  160. package/export/test/integration/utils/staking.js +19 -0
  161. package/export/test/vault/DonationVault.test.js +202 -0
  162. package/export/test/vault/TBTCVault.Redemption.test.js +357 -0
  163. package/export/test/vault/TBTCVault.test.js +768 -0
  164. package/export/typechain/BTCUtils.js +2 -0
  165. package/export/typechain/Bank.js +2 -0
  166. package/export/typechain/BankStub.js +2 -0
  167. package/export/typechain/Bridge.js +2 -0
  168. package/export/typechain/BridgeState.js +2 -0
  169. package/export/typechain/BridgeStub.js +2 -0
  170. package/export/typechain/Deposit.js +2 -0
  171. package/export/typechain/DepositSweep.js +2 -0
  172. package/export/typechain/DonationVault.js +2 -0
  173. package/export/typechain/ERC165.js +2 -0
  174. package/export/typechain/ERC1967Proxy.js +2 -0
  175. package/export/typechain/ERC1967Upgrade.js +2 -0
  176. package/export/typechain/ERC20WithPermit.js +2 -0
  177. package/export/typechain/ERC721.js +2 -0
  178. package/export/typechain/EcdsaAuthorization.js +2 -0
  179. package/export/typechain/EcdsaDkg.js +2 -0
  180. package/export/typechain/EcdsaDkgValidator.js +2 -0
  181. package/export/typechain/EcdsaInactivity.js +2 -0
  182. package/export/typechain/Fraud.js +2 -0
  183. package/export/typechain/Governable.js +2 -0
  184. package/export/typechain/HeartbeatStub.js +2 -0
  185. package/export/typechain/IApplication.js +2 -0
  186. package/export/typechain/IApproveAndCall.js +2 -0
  187. package/export/typechain/IBeacon.js +2 -0
  188. package/export/typechain/IERC165.js +2 -0
  189. package/export/typechain/IERC1822Proxiable.js +2 -0
  190. package/export/typechain/IERC20.js +2 -0
  191. package/export/typechain/IERC20Metadata.js +2 -0
  192. package/export/typechain/IERC20WithPermit.js +2 -0
  193. package/export/typechain/IERC721.js +2 -0
  194. package/export/typechain/IERC721Metadata.js +2 -0
  195. package/export/typechain/IERC721Receiver.js +2 -0
  196. package/export/typechain/IRandomBeacon.js +2 -0
  197. package/export/typechain/IRandomBeaconConsumer.js +2 -0
  198. package/export/typechain/IReceiveApproval.js +2 -0
  199. package/export/typechain/IReceiveBalanceApproval.js +2 -0
  200. package/export/typechain/IRelay.js +2 -0
  201. package/export/typechain/IStaking.js +2 -0
  202. package/export/typechain/IVault.js +2 -0
  203. package/export/typechain/IWalletOwner.js +2 -0
  204. package/export/typechain/IWalletRegistry.js +2 -0
  205. package/export/typechain/Initializable.js +2 -0
  206. package/export/typechain/MisfundRecovery.js +2 -0
  207. package/export/typechain/MovingFunds.js +2 -0
  208. package/export/typechain/Ownable.js +2 -0
  209. package/export/typechain/Proxy.js +2 -0
  210. package/export/typechain/ProxyAdmin.js +2 -0
  211. package/export/typechain/ReceiveApprovalStub.js +2 -0
  212. package/export/typechain/Redemption.js +2 -0
  213. package/export/typechain/Reimbursable.js +2 -0
  214. package/export/typechain/ReimbursementPool.js +2 -0
  215. package/export/typechain/Rewards.js +2 -0
  216. package/export/typechain/SortitionPool.js +2 -0
  217. package/export/typechain/SortitionTree.js +2 -0
  218. package/export/typechain/TBTC.js +2 -0
  219. package/export/typechain/TBTCVault.js +2 -0
  220. package/export/typechain/TestERC20.js +2 -0
  221. package/export/typechain/TestERC721.js +2 -0
  222. package/export/typechain/TestEcdsaLib.js +2 -0
  223. package/export/typechain/TestRelay.js +2 -0
  224. package/export/typechain/TransparentUpgradeableProxy.js +2 -0
  225. package/export/typechain/VendingMachine.js +2 -0
  226. package/export/typechain/WalletRegistry.js +2 -0
  227. package/export/typechain/Wallets.js +2 -0
  228. package/export/typechain/common.js +2 -0
  229. package/export/typechain/factories/BTCUtils__factory.js +94 -0
  230. package/export/typechain/factories/BankStub__factory.js +586 -0
  231. package/export/typechain/factories/Bank__factory.js +573 -0
  232. package/export/typechain/factories/BridgeState__factory.js +257 -0
  233. package/export/typechain/factories/BridgeStub__factory.js +2912 -0
  234. package/export/typechain/factories/Bridge__factory.js +2526 -0
  235. package/export/typechain/factories/DepositSweep__factory.js +61 -0
  236. package/export/typechain/factories/Deposit__factory.js +103 -0
  237. package/export/typechain/factories/DonationVault__factory.js +139 -0
  238. package/export/typechain/factories/ERC165__factory.js +38 -0
  239. package/export/typechain/factories/ERC1967Proxy__factory.js +111 -0
  240. package/export/typechain/factories/ERC1967Upgrade__factory.js +64 -0
  241. package/export/typechain/factories/ERC20WithPermit__factory.js +524 -0
  242. package/export/typechain/factories/ERC721__factory.js +388 -0
  243. package/export/typechain/factories/EcdsaAuthorization__factory.js +211 -0
  244. package/export/typechain/factories/EcdsaDkgValidator__factory.js +441 -0
  245. package/export/typechain/factories/EcdsaDkg__factory.js +192 -0
  246. package/export/typechain/factories/EcdsaInactivity__factory.js +134 -0
  247. package/export/typechain/factories/Fraud__factory.js +117 -0
  248. package/export/typechain/factories/Governable__factory.js +64 -0
  249. package/export/typechain/factories/HeartbeatStub__factory.js +61 -0
  250. package/export/typechain/factories/IApplication__factory.js +152 -0
  251. package/export/typechain/factories/IApproveAndCall__factory.js +48 -0
  252. package/export/typechain/factories/IBeacon__factory.js +32 -0
  253. package/export/typechain/factories/IERC165__factory.js +38 -0
  254. package/export/typechain/factories/IERC1822Proxiable__factory.js +32 -0
  255. package/export/typechain/factories/IERC20Metadata__factory.js +241 -0
  256. package/export/typechain/factories/IERC20WithPermit__factory.js +389 -0
  257. package/export/typechain/factories/IERC20__factory.js +202 -0
  258. package/export/typechain/factories/IERC721Metadata__factory.js +349 -0
  259. package/export/typechain/factories/IERC721Receiver__factory.js +53 -0
  260. package/export/typechain/factories/IERC721__factory.js +304 -0
  261. package/export/typechain/factories/IRandomBeaconConsumer__factory.js +37 -0
  262. package/export/typechain/factories/IRandomBeacon__factory.js +32 -0
  263. package/export/typechain/factories/IReceiveApproval__factory.js +47 -0
  264. package/export/typechain/factories/IReceiveBalanceApproval__factory.js +42 -0
  265. package/export/typechain/factories/IRelay__factory.js +45 -0
  266. package/export/typechain/factories/IStaking__factory.js +722 -0
  267. package/export/typechain/factories/IVault__factory.js +60 -0
  268. package/export/typechain/factories/IWalletOwner__factory.js +65 -0
  269. package/export/typechain/factories/IWalletRegistry__factory.js +138 -0
  270. package/export/typechain/factories/Initializable__factory.js +32 -0
  271. package/export/typechain/factories/MisfundRecovery__factory.js +145 -0
  272. package/export/typechain/factories/MovingFunds__factory.js +169 -0
  273. package/export/typechain/factories/Ownable__factory.js +71 -0
  274. package/export/typechain/factories/ProxyAdmin__factory.js +191 -0
  275. package/export/typechain/factories/Proxy__factory.js +27 -0
  276. package/export/typechain/factories/ReceiveApprovalStub__factory.js +127 -0
  277. package/export/typechain/factories/Redemption__factory.js +123 -0
  278. package/export/typechain/factories/Reimbursable__factory.js +58 -0
  279. package/export/typechain/factories/ReimbursementPool__factory.js +350 -0
  280. package/export/typechain/factories/Rewards__factory.js +117 -0
  281. package/export/typechain/factories/SortitionPool__factory.js +610 -0
  282. package/export/typechain/factories/SortitionTree__factory.js +149 -0
  283. package/export/typechain/factories/TBTCVault__factory.js +480 -0
  284. package/export/typechain/factories/TBTC__factory.js +564 -0
  285. package/export/typechain/factories/TestERC20__factory.js +539 -0
  286. package/export/typechain/factories/TestERC721__factory.js +421 -0
  287. package/export/typechain/factories/TestEcdsaLib__factory.js +66 -0
  288. package/export/typechain/factories/TestRelay__factory.js +94 -0
  289. package/export/typechain/factories/TransparentUpgradeableProxy__factory.js +186 -0
  290. package/export/typechain/factories/VendingMachine__factory.js +549 -0
  291. package/export/typechain/factories/WalletRegistry__factory.js +1919 -0
  292. package/export/typechain/factories/Wallets__factory.js +143 -0
  293. package/export/typechain/index.js +132 -0
  294. package/export.json +15932 -503
  295. package/package.json +47 -26
  296. package/artifacts/solcInputs/7cc3eda3cb3ff2522d18b5e7b31ea228.json +0 -104
@@ -0,0 +1,815 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MovedFundsSweepMultipleOutputs = exports.MovedFundsSweepProvablyUnspendableOutput = exports.MovedFundsSweepP2SHOutput = exports.MovedFundsSweepWithMainUtxo = exports.MovedFundsSweepWithoutMainUtxo = exports.MultipleInputs = exports.SingleProvablyUnspendable = exports.SingleTargetWalletButP2SH = exports.MultipleTargetWalletsButAmountDistributedUnevenly = exports.MultipleTargetWalletsAndDivisibleAmount = exports.MultipleTargetWalletsAndIndivisibleAmount = exports.SingleTargetWallet = void 0;
4
+ const fixtures_1 = require("../fixtures");
5
+ const deposit_sweep_1 = require("./deposit-sweep");
6
+ /**
7
+ * `SingleTargetWallet` test data represents a moving funds with the
8
+ * following properties:
9
+ * - 1 main UTXO input
10
+ * - 1 P2PKH output that matches the target wallet from the commitment
11
+ * - 6+ on-chain confirmations of the transaction
12
+ */
13
+ exports.SingleTargetWallet = {
14
+ wallet: {
15
+ // Uncompressed public key for the pubKeyHash `0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726`:
16
+ // 04ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04efc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
17
+ // X: ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04e
18
+ // Y: fc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
19
+ // ecdsaWalletID = keccak256(XY)
20
+ ecdsaWalletID: "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863",
21
+ pubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
22
+ state: fixtures_1.walletState.MovingFunds,
23
+ },
24
+ targetWalletsCommitment: ["0x2cd680318747b720d67bf4246eb7403b476adb34"],
25
+ expectedMovedFundsSweepRequests: [
26
+ {
27
+ walletPubKeyHash: "0x2cd680318747b720d67bf4246eb7403b476adb34",
28
+ txHash: "0xe55529ca9710bc1f3477dbd826286efe0e5885afeccdfc629050787e0dc078d0",
29
+ txOutputIndex: 0,
30
+ txOutputValue: 1464114,
31
+ },
32
+ ],
33
+ mainUtxo: {
34
+ txHash: "0xf8e3d585b2b9b7033e1c37ffca2e3bcc4bbc2c3a64527641f58d872213e5c189",
35
+ txOutputIndex: 1,
36
+ txOutputValue: 1473114,
37
+ },
38
+ // https://live.blockcypher.com/btc-testnet/tx/d078c00d7e78509062fccdecaf85580efe6e2826d8db77341fbc1097ca2955e5
39
+ movingFundsTx: {
40
+ hash: "0xe55529ca9710bc1f3477dbd826286efe0e5885afeccdfc629050787e0dc078d0",
41
+ version: "0x01000000",
42
+ inputVector: "0x01f8e3d585b2b9b7033e1c37ffca2e3bcc4bbc2c3a64527641f58d872213e5c189" +
43
+ "0100000000ffffffff",
44
+ outputVector: "0x0132571600000000001976a9142cd680318747b720d67bf4246eb7403b476adb34" +
45
+ "88ac",
46
+ locktime: "0x00000000",
47
+ },
48
+ movingFundsProof: {
49
+ merkleProof: "0x05ad8fc3f78f756b9b40b72a0eae0c342712193637a8b620d7ae7a4e9898fcd531" +
50
+ "e112414e373eaab60bccf7056cb5508a7a8c981bdc72d05cf3a66b933495c2dc8c20" +
51
+ "b2727e64a216d9c3ede995713f4793b047c048ea38872428f3196e4697a61927e6ec" +
52
+ "044b52e82b32bb1835da47e43b78971f79c61d73821f1cff269f33",
53
+ txIndexInBlock: 1,
54
+ bitcoinHeaders: "0x0000602099a892d7a02680a002a55f1da71a5d11866fbd2a8f57e96d3d00000000" +
55
+ "0000009918c5f3417fecf62a9bbc13c4798cdb89e6964af94bd43e78933b9e8c2b9d" +
56
+ "ba17f14e621ec8001a855f095804e00020f10609d9fa1132718327e2bbc0e7ab605d" +
57
+ "3431b27f9c2aa60900000000000000f7aca0f56853ed95f31cc2b3316ce45f1cf7fd" +
58
+ "fdec83564c2cb32278f606753f6ef14e621ec8001ab366ee0a04200020cd4cfc17f9" +
59
+ "0a5301a51da10d10d5f627644883fb65d399652b000000000000007b4bcb4c4d17ed" +
60
+ "f9e5e07c9eb35bf74d7b0dde10e639581754cd8b4afacc220fd3f34e621ec8001a08" +
61
+ "d65ede0000e02030fa568bb77672ce00aa73190b6394f2473e105bacc1edcba30000" +
62
+ "00000000001f61df51e500a4df9b322da069d162fd473bb97ae4999febe7c759b39d" +
63
+ "7779cabcf54e621ec8001a6cee453b000000209ea8ceb25fa3854fc8948255f6d47f" +
64
+ "7c820c5702861ee7e78100000000000000f44e0f8793c2d503817ecc991f1a836e24" +
65
+ "9763ab42936ba98703efde31fedf0518f64e621ec8001a2eb8274d00e0ff3f45dd51" +
66
+ "143f07e88060db80fa4a92e53e8103c138b36b843879000000000000004bbfaeffde" +
67
+ "81470807f3c9a346479172bf02e4ea62d2f51e0c53163737488dc296f64e621ec800" +
68
+ "1a72dc0b16",
69
+ },
70
+ chainDifficulty: 21461933,
71
+ };
72
+ /**
73
+ * `MultipleTargetWalletsAndIndivisibleAmount` test data represents a moving
74
+ * funds with the following properties:
75
+ * - 1 main UTXO input
76
+ * - 2 P2PKH and 1 P2WPKH outputs that matches the target wallets from
77
+ * the commitment
78
+ * - The total transacted amount is not divisible by 3 so one wallet obtains
79
+ * the remainder
80
+ * - 6+ on-chain confirmations of the transaction
81
+ */
82
+ exports.MultipleTargetWalletsAndIndivisibleAmount = {
83
+ wallet: {
84
+ // Uncompressed public key for the pubKeyHash `0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726`:
85
+ // 04ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04efc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
86
+ // X: ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04e
87
+ // Y: fc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
88
+ // ecdsaWalletID = keccak256(XY)
89
+ ecdsaWalletID: "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863",
90
+ pubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
91
+ state: fixtures_1.walletState.MovingFunds,
92
+ },
93
+ targetWalletsCommitment: [
94
+ "0x2cd680318747b720d67bf4246eb7403b476adb34",
95
+ "0x8900de8fc6e4cd1db4c7ab0759d28503b4cb0ab1",
96
+ "0xaf7a841e055fc19bf31acf4cbed5ef548a2cc453",
97
+ ],
98
+ expectedMovedFundsSweepRequests: [
99
+ {
100
+ walletPubKeyHash: "0x2cd680318747b720d67bf4246eb7403b476adb34",
101
+ txHash: "0x7cff663e3e08847a5579913f6a66bc6c01f5f48c6ae1783be77418ed188021e6",
102
+ txOutputIndex: 0,
103
+ txOutputValue: 595484,
104
+ },
105
+ {
106
+ walletPubKeyHash: "0x8900de8fc6e4cd1db4c7ab0759d28503b4cb0ab1",
107
+ txHash: "0x7cff663e3e08847a5579913f6a66bc6c01f5f48c6ae1783be77418ed188021e6",
108
+ txOutputIndex: 1,
109
+ txOutputValue: 595485,
110
+ },
111
+ {
112
+ walletPubKeyHash: "0xaf7a841e055fc19bf31acf4cbed5ef548a2cc453",
113
+ txHash: "0x7cff663e3e08847a5579913f6a66bc6c01f5f48c6ae1783be77418ed188021e6",
114
+ txOutputIndex: 2,
115
+ txOutputValue: 595484,
116
+ },
117
+ ],
118
+ mainUtxo: {
119
+ txHash: "0x80653f6e07dabddae14cf08d45475388343763100e4548914d811f373465a42e",
120
+ txOutputIndex: 1,
121
+ txOutputValue: 1795453,
122
+ },
123
+ // https://live.blockcypher.com/btc-testnet/tx/e6218018ed1874e73b78e16a8cf4f5016cbc666a3f9179557a84083e3e66ff7c
124
+ movingFundsTx: {
125
+ hash: "0x7cff663e3e08847a5579913f6a66bc6c01f5f48c6ae1783be77418ed188021e6",
126
+ version: "0x01000000",
127
+ inputVector: "0x0180653f6e07dabddae14cf08d45475388343763100e4548914d811f373465a42e" +
128
+ "0100000000ffffffff",
129
+ outputVector: "0x031c160900000000001976a9142cd680318747b720d67bf4246eb7403b476adb34" +
130
+ "88ac1d160900000000001600148900de8fc6e4cd1db4c7ab0759d28503b4cb0ab11c" +
131
+ "160900000000001976a914af7a841e055fc19bf31acf4cbed5ef548a2cc45388ac",
132
+ locktime: "0x00000000",
133
+ },
134
+ movingFundsProof: {
135
+ merkleProof: "0x4880d00e942d1e54b9281b138ebe684d82067bd3cc55fbb54a4fe5f441f387b370" +
136
+ "029b1360cd2fff4bd5ce292e35ab1650ee349017a25c6c5c47adfb59a41a6d707207" +
137
+ "bebf7f0449f03b9c068ac503030f77a12b780806567c16c8f7082c85f9c2217e059c" +
138
+ "48d928ee7c0ba8ee7c990e0fbf901826a41e33be7f3285073b00e8002facdc932c69" +
139
+ "016325366f73981195c32096c3a35639cd995779eeeecb2ede16dc684bd43380af42" +
140
+ "f7d20e352ff647a80f628bdeed12c9c229de6c8359c6ef44d02180f40038258359fa" +
141
+ "c75124826493e35533c6a930a1bc7b1f78d40cdd65",
142
+ txIndexInBlock: 14,
143
+ bitcoinHeaders: "0x04200020cd4cfc17f90a5301a51da10d10d5f627644883fb65d399652b00000000" +
144
+ "0000007b4bcb4c4d17edf9e5e07c9eb35bf74d7b0dde10e639581754cd8b4afacc22" +
145
+ "0fd3f34e621ec8001a08d65ede0000e02030fa568bb77672ce00aa73190b6394f247" +
146
+ "3e105bacc1edcba3000000000000001f61df51e500a4df9b322da069d162fd473bb9" +
147
+ "7ae4999febe7c759b39d7779cabcf54e621ec8001a6cee453b000000209ea8ceb25f" +
148
+ "a3854fc8948255f6d47f7c820c5702861ee7e78100000000000000f44e0f8793c2d5" +
149
+ "03817ecc991f1a836e249763ab42936ba98703efde31fedf0518f64e621ec8001a2e" +
150
+ "b8274d00e0ff3f45dd51143f07e88060db80fa4a92e53e8103c138b36b8438790000" +
151
+ "00000000004bbfaeffde81470807f3c9a346479172bf02e4ea62d2f51e0c53163737" +
152
+ "488dc296f64e621ec8001a72dc0b16000000205442a6fc93ed4586bd29360d359c82" +
153
+ "4d1edae51ba1fccb2b2600000000000000853aa96dab6e2e2049b27f0e47157b84b9" +
154
+ "b28e451550cf257b7f929db049686906f74e621ec8001a36e620b104200020e0a49a" +
155
+ "c7a66b57a3a3d6c179ec95ecc62779fe8d9e50115196000000000000005b3438c4f0" +
156
+ "1b35a067f30d26d2ef1c4c5f1d7245e1146402fcba2d0ee9ac9a181af84e621ec800" +
157
+ "1a827753500000c020134645f88ef4c28e11dc8c9cb29eb4a679b9793d6c3b75c4a3" +
158
+ "00000000000000753631af53921164be60b8aee0eb1d76c706ea9bb9cf4f53b8cb65" +
159
+ "830a3e982732f84e621ec8001a10de64d4",
160
+ },
161
+ chainDifficulty: 21461933,
162
+ };
163
+ /**
164
+ * `MultipleTargetWalletsAndDivisibleAmount` test data represents a moving
165
+ * funds with the following properties:
166
+ * - 1 main UTXO input
167
+ * - 2 P2PKH and 1 P2WPKH outputs that matches the target wallets from
168
+ * the commitment
169
+ * - The total transacted amount is divisible by 3 so all wallets obtain
170
+ * exactly the same amount.
171
+ * - 6+ on-chain confirmations of the transaction
172
+ */
173
+ exports.MultipleTargetWalletsAndDivisibleAmount = {
174
+ wallet: {
175
+ // Uncompressed public key for the pubKeyHash `0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726`:
176
+ // 04ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04efc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
177
+ // X: ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04e
178
+ // Y: fc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
179
+ // ecdsaWalletID = keccak256(XY)
180
+ ecdsaWalletID: "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863",
181
+ pubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
182
+ state: fixtures_1.walletState.MovingFunds,
183
+ },
184
+ targetWalletsCommitment: [
185
+ "0x2cd680318747b720d67bf4246eb7403b476adb34",
186
+ "0x8900de8fc6e4cd1db4c7ab0759d28503b4cb0ab1",
187
+ "0xaf7a841e055fc19bf31acf4cbed5ef548a2cc453",
188
+ ],
189
+ expectedMovedFundsSweepRequests: [
190
+ {
191
+ walletPubKeyHash: "0x2cd680318747b720d67bf4246eb7403b476adb34",
192
+ txHash: "0xe87a93611b6ea128c5a4f0fa6f824d450be50bbfeb56b046ef6af8feca7fe916",
193
+ txOutputIndex: 0,
194
+ txOutputValue: 390649,
195
+ },
196
+ {
197
+ walletPubKeyHash: "0x8900de8fc6e4cd1db4c7ab0759d28503b4cb0ab1",
198
+ txHash: "0xe87a93611b6ea128c5a4f0fa6f824d450be50bbfeb56b046ef6af8feca7fe916",
199
+ txOutputIndex: 1,
200
+ txOutputValue: 390649,
201
+ },
202
+ {
203
+ walletPubKeyHash: "0xaf7a841e055fc19bf31acf4cbed5ef548a2cc453",
204
+ txHash: "0xe87a93611b6ea128c5a4f0fa6f824d450be50bbfeb56b046ef6af8feca7fe916",
205
+ txOutputIndex: 2,
206
+ txOutputValue: 390649,
207
+ },
208
+ ],
209
+ mainUtxo: {
210
+ txHash: "0x9b71b2b9011e42b6dcb0c35ae11924c6492b20f7d851128abacc92864e362b7a",
211
+ txOutputIndex: 1,
212
+ txOutputValue: 1180947,
213
+ },
214
+ // https://live.blockcypher.com/btc-testnet/tx/16e97fcafef86aef46b056ebbf0be50b454d826ffaf0a4c528a16e1b61937ae8
215
+ movingFundsTx: {
216
+ hash: "0xe87a93611b6ea128c5a4f0fa6f824d450be50bbfeb56b046ef6af8feca7fe916",
217
+ version: "0x01000000",
218
+ inputVector: "0x019b71b2b9011e42b6dcb0c35ae11924c6492b20f7d851128abacc92864e362b7a" +
219
+ "0100000000ffffffff",
220
+ outputVector: "0x03f9f50500000000001976a9142cd680318747b720d67bf4246eb7403b476adb34" +
221
+ "88acf9f50500000000001600148900de8fc6e4cd1db4c7ab0759d28503b4cb0ab1f9" +
222
+ "f50500000000001976a914af7a841e055fc19bf31acf4cbed5ef548a2cc45388ac",
223
+ locktime: "0x00000000",
224
+ },
225
+ movingFundsProof: {
226
+ merkleProof: "0xac8ba8a6e34fbbffda8372ce6aa213499a98e324ab5e876b3b5a5b39293ca2de3b" +
227
+ "ff933268c91c05241541b557b7d9400f2fa2129480dd1813bb926419c56d886454bc" +
228
+ "6cc16b641f6824f89093a4c9abfa4245ea182dc745e12080fe987d1c93bcae141087" +
229
+ "33d865392c5e0c04582fea7467b362b0c0a604caa59f65b9578bb133aefc47b304e6" +
230
+ "2a83d5aec7954e75d827fbd7b46084f231db6e36e6b61c6f35b38a557b15d553bed7" +
231
+ "878bacd99803f9fff7e0ec4b0a97f13a9144fc162dec36",
232
+ txIndexInBlock: 12,
233
+ bitcoinHeaders: "0x0000e02030fa568bb77672ce00aa73190b6394f2473e105bacc1edcba300000000" +
234
+ "0000001f61df51e500a4df9b322da069d162fd473bb97ae4999febe7c759b39d7779" +
235
+ "cabcf54e621ec8001a6cee453b000000209ea8ceb25fa3854fc8948255f6d47f7c82" +
236
+ "0c5702861ee7e78100000000000000f44e0f8793c2d503817ecc991f1a836e249763" +
237
+ "ab42936ba98703efde31fedf0518f64e621ec8001a2eb8274d00e0ff3f45dd51143f" +
238
+ "07e88060db80fa4a92e53e8103c138b36b843879000000000000004bbfaeffde8147" +
239
+ "0807f3c9a346479172bf02e4ea62d2f51e0c53163737488dc296f64e621ec8001a72" +
240
+ "dc0b16000000205442a6fc93ed4586bd29360d359c824d1edae51ba1fccb2b260000" +
241
+ "0000000000853aa96dab6e2e2049b27f0e47157b84b9b28e451550cf257b7f929db0" +
242
+ "49686906f74e621ec8001a36e620b104200020e0a49ac7a66b57a3a3d6c179ec95ec" +
243
+ "c62779fe8d9e50115196000000000000005b3438c4f01b35a067f30d26d2ef1c4c5f" +
244
+ "1d7245e1146402fcba2d0ee9ac9a181af84e621ec8001a827753500000c020134645" +
245
+ "f88ef4c28e11dc8c9cb29eb4a679b9793d6c3b75c4a300000000000000753631af53" +
246
+ "921164be60b8aee0eb1d76c706ea9bb9cf4f53b8cb65830a3e982732f84e621ec800" +
247
+ "1a10de64d4000060202b62c803c2129fbbf533f35de3e84694ed475aab83dfe11ba0" +
248
+ "000000000000000de368e3dfdf42f498e8dea274f4c277547844bb07c28340a1a288" +
249
+ "c86ea38d1113f94e621ec8001a7372433c",
250
+ },
251
+ chainDifficulty: 21461933,
252
+ };
253
+ /**
254
+ * `MultipleTargetWalletsButAmountDistributedUnevenly` test data represents a
255
+ * moving funds with the following properties:
256
+ * - 1 main UTXO input
257
+ * - 2 P2PKH and 1 P2WPKH outputs that matches the target wallets from
258
+ * the commitment
259
+ * - The total transacted amount is distributed unevenly over the target wallets
260
+ * - 6+ on-chain confirmations of the transaction
261
+ * - This is not a valid moving funds transaction that should be rejected
262
+ * because amounts are not evenly distributed.
263
+ */
264
+ exports.MultipleTargetWalletsButAmountDistributedUnevenly = {
265
+ wallet: {
266
+ // Uncompressed public key for the pubKeyHash `0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726`:
267
+ // 04ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04efc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
268
+ // X: ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04e
269
+ // Y: fc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
270
+ // ecdsaWalletID = keccak256(XY)
271
+ ecdsaWalletID: "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863",
272
+ pubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
273
+ state: fixtures_1.walletState.MovingFunds,
274
+ },
275
+ targetWalletsCommitment: [
276
+ "0x2cd680318747b720d67bf4246eb7403b476adb34",
277
+ "0x8900de8fc6e4cd1db4c7ab0759d28503b4cb0ab1",
278
+ "0xaf7a841e055fc19bf31acf4cbed5ef548a2cc453",
279
+ ],
280
+ mainUtxo: {
281
+ txHash: "0x3ca370f492449e2b413c27fe18b1a139f602d049fc0903595c41441f5a35eaed",
282
+ txOutputIndex: 0,
283
+ txOutputValue: 1279418,
284
+ },
285
+ // https://live.blockcypher.com/btc-testnet/tx/5b362273b9471f62c35b2ef6940c3c13bd2b773626ab5de63efe4e895d56f98c
286
+ movingFundsTx: {
287
+ hash: "0x8cf9565d894efe3ee65dab2636772bbd133c0c94f62e5bc3621f47b97322365b",
288
+ version: "0x01000000",
289
+ inputVector: "0x013ca370f492449e2b413c27fe18b1a139f602d049fc0903595c41441f5a35eaed" +
290
+ "0000000000ffffffff",
291
+ outputVector: "0x032f760600000000001976a9142cd680318747b720d67bf4246eb7403b476adb34" +
292
+ "88ac30760600000000001600148900de8fc6e4cd1db4c7ab0759d28503b4cb0ab133" +
293
+ "760600000000001976a914af7a841e055fc19bf31acf4cbed5ef548a2cc45388ac",
294
+ locktime: "0x00000000",
295
+ },
296
+ movingFundsProof: {
297
+ merkleProof: "0x24c50204f1d2c838e7872dd7f5c3a38bac573cce654620dfec76c6a05e9eb3139d" +
298
+ "b0514e107025c8c055c8a10e83826c244820a32821a3d010880c1b3ab6bcf620fb48" +
299
+ "f188126e2628fb2d3ead8b7bd458c0bc9d2b6d15368831538114901f3bfd9ad0532a" +
300
+ "b93c6f36c1755d3315fbdd146753b2332363cf75b931ddb824e9c3e21676a253e14f" +
301
+ "be05ca546420c7b2e535666129660fb462adde0075114d5e00",
302
+ txIndexInBlock: 2,
303
+ bitcoinHeaders: "0x00000020fea86838d788d0c0e2f4c32272ba5dd599c4bd04baa4ff759900000000" +
304
+ "000000b04fb0eaa2f1e39b53c26afdfa726289940864e3a42e06103fc7236aa67b15" +
305
+ "f3d50c50621ec8001a73dc826b04000020b18b27f95a438fd3d1bd571fd5ed10876b" +
306
+ "678f7f29cbb9a3ba000000000000009f9da0db22cc9d10d085502e74e6025e295bef" +
307
+ "3abc1441f7f0986ddadfd97776ce0d50621ec8001a7b784f6200000020e17a6b1a17" +
308
+ "34108e303b47a27ac7ff80a9ce9facc795e5bf8600000000000000e6da2811b1b28d" +
309
+ "b55ac59062c3651798356c5186b92664628eae8bc14f634ec27b0e50621ec8001a2e" +
310
+ "4075860000c020e7021f51166a77246660d627322dc6887cf0a9491f07f3d9430000" +
311
+ "00000000005c5437498047dcc617029442e5493460987ce6a1d186c2562412eae524" +
312
+ "42aa79b20e50621ec8001a02d802c804000020007219023a7eea3691d8091f3e67a2" +
313
+ "c17bbe15da9ae464663c000000000000007e1b1140ada8cb3f240f011243c8da5e4d" +
314
+ "abcd753d22d13c86d7c240413165f6160f50621ec8001a57daeccc0000a020a8597b" +
315
+ "1c1720560be7cc0f3707499f11e05df742c74cb5c99f00000000000000e17e1fc4b6" +
316
+ "70a70c0c67b1ccb183f0e8bf4c3321039d49675aa6886bd2ec691c4e0f50621ec800" +
317
+ "1a59b3b33c000000205058b8dcbbfdfb9e00b30e3f374ec17e1789fc4f3f678f27bf" +
318
+ "000000000000001b329dd98f5f1d79f36d0b74fa3da4a9e82609a424287f6e1de301" +
319
+ "485278b0ce4f1150621ec8001a4b24dd9e",
320
+ },
321
+ chainDifficulty: 21461933,
322
+ };
323
+ /**
324
+ * `SingleTargetWalletButP2SH` test data represents a moving funds with the
325
+ * following properties:
326
+ * - 1 main UTXO input
327
+ * - 1 P2SH output that matches the target wallet from the commitment
328
+ * - 6+ on-chain confirmations of the transaction
329
+ * - This is not a valid moving funds transaction that should be rejected
330
+ * because of the illegal P2SH output.
331
+ */
332
+ exports.SingleTargetWalletButP2SH = {
333
+ wallet: {
334
+ // Uncompressed public key for the pubKeyHash `0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726`:
335
+ // 04ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04efc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
336
+ // X: ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04e
337
+ // Y: fc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
338
+ // ecdsaWalletID = keccak256(XY)
339
+ ecdsaWalletID: "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863",
340
+ pubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
341
+ state: fixtures_1.walletState.MovingFunds,
342
+ },
343
+ targetWalletsCommitment: ["0x86884e6be1525dab5ae0b451bd2c72cee67dcf41"],
344
+ mainUtxo: {
345
+ txHash: "0xb69a2869840aa6fdfd143136ff4514ca46ea2d876855040892ad74ab8c527422",
346
+ txOutputIndex: 1,
347
+ txOutputValue: 1177424,
348
+ },
349
+ // https://live.blockcypher.com/btc-testnet/tx/70d4182e795ebb0ddd8339ed9c0213d6e48f7cb6c956ced03c49f554a93a5669
350
+ movingFundsTx: {
351
+ hash: "0x69563aa954f5493cd0ce56c9b67c8fe4d613029ced3983dd0dbb5e792e18d470",
352
+ version: "0x01000000",
353
+ inputVector: "0x01b69a2869840aa6fdfd143136ff4514ca46ea2d876855040892ad74ab8c527422" +
354
+ "0100000000ffffffff",
355
+ outputVector: "0x015cf511000000000017a91486884e6be1525dab5ae0b451bd2c72cee67dcf4187",
356
+ locktime: "0x00000000",
357
+ },
358
+ movingFundsProof: {
359
+ merkleProof: "0xba19ac24192479ac72000fe4500ec87f7b8cf994e90f42c3e66e70f9decfd81aee" +
360
+ "743b1c3a6935e4d157221fc36e6e24182ed94fc23f4f5268d51c9c7625acebc65c9b" +
361
+ "4a0e8e4eb52a89852aeaa1f935058620ccff4ade5fb5e05524ae727dfcaa9004792a" +
362
+ "281959ca2c8b6839135ee645353783f4c6c7d358acf3f4a83f819dec4effe91462dc" +
363
+ "fbc0d0ed6b4cc38e5470eaf5b450481482d9201a4fd870f9ec81aa88378f3e2aab62" +
364
+ "de93105ed1563a8b3fca7995f9828a9042639680d0e49488cb14eabe41276f4ed8f8" +
365
+ "7527690fb7f83b3b9abb170e1aadac941b53c29ec09e85514a6844e864397ded279e" +
366
+ "f4ace9833195f112cff129626f30a1bbc9b22f",
367
+ txIndexInBlock: 33,
368
+ bitcoinHeaders: "0x00000020f47db0755dc684d17088c20b5d0cfdd2a637c0c1d611616f9cd868b100" +
369
+ "00000084349634f8489675c4ac31b82f66f3c6ea369f328e8dc08716d245a0a01bfa" +
370
+ "ba1a161662ffff001dab708bb90000002031b92d92aa302ad2a73058eaaa09ebfad1" +
371
+ "4be89cae782709e197b352000000009e5528a66f13a86be6f61937d478d696c9cae9" +
372
+ "ebce6649bf80b0b0be070f3cb1e51a1662ffff001d55d83989",
373
+ },
374
+ chainDifficulty: 1,
375
+ };
376
+ /**
377
+ * `SingleProvablyUnspendable` test data represents a moving funds with
378
+ * the following properties:
379
+ * - 1 main UTXO input
380
+ * - 1 provably unspendable output with value 0 satoshi and index 0.
381
+ * - 6+ on-chain confirmations of the transaction
382
+ * - This is not a valid moving funds transaction that should be rejected
383
+ * because of the provably unspendable output.
384
+ */
385
+ exports.SingleProvablyUnspendable = {
386
+ wallet: {
387
+ // Uncompressed public key for the pubKeyHash `0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726`:
388
+ // 04ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04efc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
389
+ // X: ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04e
390
+ // Y: fc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
391
+ // ecdsaWalletID = keccak256(XY)
392
+ ecdsaWalletID: "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863",
393
+ pubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
394
+ state: fixtures_1.walletState.MovingFunds,
395
+ },
396
+ targetWalletsCommitment: ["0x86884e6be1525dab5ae0b451bd2c72cee67dcf41"],
397
+ mainUtxo: {
398
+ txHash: "0xc83c538a70028dd9fd40d7e8be0d05dc414a95927eb52df895e9d0c424786c53",
399
+ txOutputIndex: 0,
400
+ txOutputValue: 1914700,
401
+ },
402
+ // https://live.blockcypher.com/btc-testnet/tx/58a7d94d019aa658d00dfa2b5d5bb6b5d627b71afefff2bda5db501a75981fd3
403
+ movingFundsTx: {
404
+ hash: "0xd31f98751a50dba5bdf2fffe1ab727d6b5b65b5d2bfa0dd058a69a014dd9a758",
405
+ version: "0x01000000",
406
+ inputVector: "0x01c83c538a70028dd9fd40d7e8be0d05dc414a95927eb52df895e9d0c424786c53" +
407
+ "0000000000ffffffff",
408
+ outputVector: "0x010000000000000000176a0f6d6f6e6579627574746f6e2e636f6d0568656c6c6f",
409
+ locktime: "0x00000000",
410
+ },
411
+ movingFundsProof: {
412
+ merkleProof: "0x905ff7ee49bf6e4290d4045f19317130044e77241b4b38fb3c8c1f1413b8a89574" +
413
+ "ebfb6efeabf05d65f5ad9cc1f8355d2a00a4ca22d7c7a0e0cabc0d6a4c6c00db10e3" +
414
+ "b9f542c6eeb6ec38df9acba0726e452cf50d19b285b5ebb60e2faafb24ea8a2604cc" +
415
+ "8f08c7ab494f4619e240bcc91e91174432a07809ffbfa579e931c16ccbdff6587298" +
416
+ "eb5a02da3f1afc3d5f0ccc06ddad31690cae99d9261218fa4f76e3bd2c3157089f5f" +
417
+ "4586201fccd2ebcc75db72b46fc7a026de0ac5dd7a8245",
418
+ txIndexInBlock: 1,
419
+ bitcoinHeaders: "0x040000201d7a507f86c714fd747e45078096087c65bcabb8e6defa98b433000000" +
420
+ "000000d27279d16f4ef9b10ab2fd0b20be00cf380f9e1d4409d1577822cffbd65989" +
421
+ "d9cb081e62ed3e031ab61e9f5600000020b811a75ec03812f7a0b8580b73282afd59" +
422
+ "6ed9d2b0a9b1c79700000000000000538ba47e9eade7963da25fa640d87a2234489f" +
423
+ "a60741fb2ba89efab52e442b77810d1e62ffff001de0c4afc504e00020342898739f" +
424
+ "1e6ac6e8fe86dc3584fe8f21e5bef01dc714033a20ad3300000000910830b662c217" +
425
+ "5c9a41b3377d072a2b0290d5e44e8a40e038acae63171d216b140f1e62ed3e031a32" +
426
+ "b4b5e000000020345c4a1f645e26da4ec35cbc52543c6871e526b0a6c52070a30200" +
427
+ "00000000002160037975ec5f355cba38f4e9e2a98d8271bba7844a313fb5cb91709a" +
428
+ "4b4c0ee6131e62ffff001da0bddd2404000020667e4f0e217d2f2dd4d5fdcfb27857" +
429
+ "bdd3ae0c643a036897e762a99600000000f189c5237d6d5e15214a7f4d0ad6b82ac1" +
430
+ "522a1b1ee93bc4c76ab169462f26c308161e62ed3e031af4b78af704e00020968648" +
431
+ "2db903e6880604162d4ecedb113e5e0895131dcb608900000000000000d3d4eeb630" +
432
+ "cc71bb0ebf76822c95e19b3d0046ad01b74b6941507b5beaa1cf67db191e62ed3e03" +
433
+ "1a0040a522040000208d370c6f9d47eaf0c1ab779a5b811838a61403def157972e35" +
434
+ "0300000000000080b93554feec4b0c497738f604526bf990bb8924c538f58f030f3a" +
435
+ "ff72bc0347e91b1e62ed3e031a07543bdf",
436
+ },
437
+ chainDifficulty: 5168815,
438
+ };
439
+ /**
440
+ * `MultipleInputs` test data represents a moving funds with
441
+ * the following properties:
442
+ * - 2 inputs where 1 of them points to the main UTXO
443
+ * - 6+ on-chain confirmations of the transaction
444
+ * - This is not a valid moving funds transaction that should be rejected
445
+ * because of the multiple inputs.
446
+ */
447
+ exports.MultipleInputs = {
448
+ wallet: {
449
+ // Uncompressed public key for the pubKeyHash `0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726`:
450
+ // 04ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04efc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
451
+ // X: ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94117a9c65be3911c5c04e
452
+ // Y: fc314aa6ecfea6a43232df446014c41fd7446fe9deed7c2b054f7ea36e396306
453
+ // ecdsaWalletID = keccak256(XY)
454
+ ecdsaWalletID: "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863",
455
+ pubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
456
+ state: fixtures_1.walletState.MovingFunds,
457
+ },
458
+ targetWalletsCommitment: ["0x86884e6be1525dab5ae0b451bd2c72cee67dcf41"],
459
+ mainUtxo: {
460
+ txHash: "0xc9e58780c6c289c25ae1fe293f85a4db4d0af4f305172f2a1868ddd917458bdf",
461
+ txOutputIndex: 1,
462
+ txOutputValue: 718510,
463
+ },
464
+ // https://live.blockcypher.com/btc-testnet/tx/605edd75ae0b4fa7cfc7aae8f1399119e9d7ecc212e6253156b60d60f4925d44
465
+ movingFundsTx: {
466
+ hash: "0x445d92f4600db6563125e612c2ecd7e9199139f1e8aac7cfa74f0bae75dd5e60",
467
+ version: "0x01000000",
468
+ inputVector: "0x0225a666beb7380a3fa2a0a8f64a562c7f1749a131bfee26ff61e4cee07cb3dd" +
469
+ "030100000000ffffffffc9e58780c6c289c25ae1fe293f85a4db4d0af4f305172f" +
470
+ "2a1868ddd917458bdf0100000000ffffffff",
471
+ outputVector: "0x03c0900400000000001976a9142cd680318747b720d67bf4246eb7403b476adb" +
472
+ "3488acc090040000000000160014e6f9d74726b19b75f16fe1e9feaec048aa4fa1" +
473
+ "d0041d0800000000001600147ac2d9378a1c47e589dfb8095ca95ed2140d2726",
474
+ locktime: "0x00000000",
475
+ },
476
+ movingFundsProof: {
477
+ merkleProof: "0x88269e1c322be70bfbefb31c21880716592b5c50cc05daed725278d574c3e472" +
478
+ "6347cd0825a64a705f72133c93a181547d0a27919605ef110aeafc30a88fefdfc1" +
479
+ "c9d3e01fbb6e628ed67c41b5ea533a112883d5a8672d669fe3739ca7b274b3c1f5" +
480
+ "4765886f2444ef13d4c90d72594920df006793362ec6169ae4840be26af17fb255" +
481
+ "5399b14643436ba75f862e4aac9b5e53c68dddc706720ab18f2f46be59a00211d8" +
482
+ "cf4f8e311f49f2a52177c7a21d421e52748d01114e83e13c21ad4131",
483
+ txIndexInBlock: 1,
484
+ bitcoinHeaders: "0x000000208ec76388aa580d8fa32ce9becbfd8f140dc33fc5a91fbc00f9020000" +
485
+ "00000000959305797e5c97c81fe38629d01271d3f583f4cebe878ddb3e93547004" +
486
+ "b29f7961952062ed3e031a6bd3f8050000ff3f42a37a9f0d546b1752e712abf607" +
487
+ "ee0d4f63d65e2590ccef4202000000000000ce9a58c9a6f39c18225afd7a7e5591" +
488
+ "423d77620595d4dd264167d889c4ddb7fa28972062ed3e031a75397f0104e00020" +
489
+ "d9cb8a5f9c012c43e9e0ccb4eb2ef134f3deb03a71ec005c8c0000000000000058" +
490
+ "fd6736c2d43ef0e414e31333f08fda58be1046967f412be7033421e4ca87e03997" +
491
+ "2062ed3e031acd8c3dcb04000020bbcf82f0e7a70b2070f7c32e8ac686fa2bef3c" +
492
+ "f735ea7778030200000000000049926ec1e65124db0045942e5e98a323e8c15a9e" +
493
+ "1c6a43139b79618fc7efcece37972062ed3e031ab38bf0fc00e0002055daa8e180" +
494
+ "320777a0b8d9b27f574513720caa0bd4c6f7ae34030000000000009935ad26c911" +
495
+ "4f4b21781b3509a8d106b2b597af2fa41e19469cca843a1c650b49972062ed3e03" +
496
+ "1a6a3ca59100e0002012ea5dafd8e9e4c149da2e3a896281b68b375eb2ea38cdef" +
497
+ "1403000000000000c9e61160c8367db22bbf0f3a0c07acb29ea15ca44cbc92a2dc" +
498
+ "9ea17a971c2e63ad982062ed3e031a3cfc880f00e00020fc72ae375a8cd436d959" +
499
+ "c96b73323c81e2ef11e31d7c98e72e02000000000000711a4b0d4fadef376c37da" +
500
+ "044aa896ea0e7c64008c2d6c3e3eb2d6f1b58e78b5339a2062ed3e031a9b77f2eb",
501
+ },
502
+ chainDifficulty: 5168815,
503
+ };
504
+ /**
505
+ * `MovedFundsSweepWithoutMainUtxo` test data represents a moved funds sweep
506
+ * with the following properties:
507
+ * - 1 P2WPKH input pointing to a moved funds sweep request
508
+ * - 1 P2WPKH output that locks funds on the sweeping wallet public key hash
509
+ * - 6+ on-chain confirmations of the transaction
510
+ */
511
+ exports.MovedFundsSweepWithoutMainUtxo = {
512
+ wallet: {
513
+ // In this scenario, the `ecdsaWalletID` is not relevant at all, so it
514
+ // is an arbitrary hex not connected with the `pubKeyHash`
515
+ ecdsaWalletID: "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863",
516
+ pubKeyHash: "0x8db50eb52063ea9d98b3eac91489a90f738986f6",
517
+ state: fixtures_1.walletState.Live,
518
+ },
519
+ movedFundsSweepRequest: {
520
+ walletPubKeyHash: "0x8db50eb52063ea9d98b3eac91489a90f738986f6",
521
+ txHash: "0x51f373dcbb6122bcb1c62964b5f3be923092dc64bc9e31257931d58c4eadb9f5",
522
+ txOutputIndex: 0,
523
+ txOutputValue: 18500,
524
+ },
525
+ mainUtxo: deposit_sweep_1.NO_MAIN_UTXO,
526
+ // https://live.blockcypher.com/btc-testnet/tx/3c5e414be0a36e7cd8a6b3a554b4bd9bebe3eee4eddd0dd2a182652e5772b1ad
527
+ sweepTx: {
528
+ hash: "0xadb172572e6582a1d20dddede4eee3eb9bbdb454a5b3a6d87c6ea3e04b415e3c",
529
+ version: "0x01000000",
530
+ inputVector: "0x0151f373dcbb6122bcb1c62964b5f3be923092dc64bc9e31257931d58c4eadb9f5" +
531
+ "0000000000ffffffff",
532
+ outputVector: "0x0174400000000000001600148db50eb52063ea9d98b3eac91489a90f738986f6",
533
+ locktime: "0x00000000",
534
+ },
535
+ sweepProof: {
536
+ merkleProof: "0x420b7804b046b62d2c58ed265f1f4c1f5a870cb0dbb1788f251d4377a6ac198cca" +
537
+ "80146dde2a79fab2cdcec6704d3166c1a60cb03b685faf895d171929874798341f0b" +
538
+ "acfd708ccdb0de53fd6f99c56d6b5ecd4f68b9ce33e1ff2f38843671a6b252ef1c80" +
539
+ "e934fd37dba1a508eac0b4f574dee4bd2896d069594c07314c7f5668dd6f681ea181" +
540
+ "bfa9eb1b37825ba05f74fa8ec78f0014dff6d4365cf68697b630254f65249c7909d7" +
541
+ "5ca862aaf2ebb1d7eac6334a68104605ed0f57b7ab5e58744f028d58b36016f2e78c" +
542
+ "b4701aace4a64dcc85e3be1d4db96fe4275658c941",
543
+ txIndexInBlock: 12,
544
+ bitcoinHeaders: "0x0000e0205c5df9ba0f31cdf5ad8c146fb16c1199d27309ed31e34934b800000000" +
545
+ "0000002c183edd5a6d3e7c2205a8a2c1dab8e0940bd120d4f6fcc5ab4d38d77fbe0e" +
546
+ "572a9bf261ffff001d2a446a0e000060209727625876c086cee161094c5eb7e535de" +
547
+ "c7064c345c46b2413298000000000050d8a67fef29c6b9329257b3fe29e4c24894ee" +
548
+ "32cbce7c15a67a401169a065f3dc9ff261ffff001d8fb08e4100400020b52821b4fd" +
549
+ "96d162a27d4dcc1aafd6439de4fcec11dca8a4af70bc00000000000c76c80b49a7b3" +
550
+ "549fe8421d365fb31966cd41fe47b067dcc97108db1c20a27b8da4f261ffff001d2a" +
551
+ "74b0a70000002046501508ec2bea6c9d8fd891f1f596410068b178005ea5f5f0a7ae" +
552
+ "130000000070e9a74d4ab00d601c62fa42fd38c1ec5fec628180341f4eaa667d6364" +
553
+ "fed3b193a5f261cbcd001a78634212d49820001e1adb3e29eb4aa11c99e7d5c77dbb" +
554
+ "e7803760926f57e1f9a50000000000000018182cbc30f44efa5eabbb9a2f9888a27f" +
555
+ "eb6d2e2f1e1461534344cf1dafd437e3a6f261cbcd001a8959a5db002000207cddca" +
556
+ "26ea39dd08f6345c0057300443d7720c5ab4937c2711000000000000004eb83f96a1" +
557
+ "f1ace06832a7eb8b3a407f04b37e211363422bf58ddeb50f20a8a54ba7f261cbcd00" +
558
+ "1a25011a6100000020a255594fd7ad6096e47c5b0b3a636cf0ac0dafc0dcf60277a5" +
559
+ "00000000000000d75ff7b7b32573d64219f81e65e61881446f68dcf47a7f5b47444b" +
560
+ "fd35db25f5a3a8f261cbcd001a32960f84",
561
+ },
562
+ chainDifficulty: 1,
563
+ };
564
+ /**
565
+ * `MovedFundsSweepWithMainUtxo` test data represents a moved funds sweep
566
+ * with the following properties:
567
+ * - 1 P2PKH input pointing to a moved funds sweep request
568
+ * - 1 P2PKH input pointing to the sweeping wallet main UTXO
569
+ * - 1 P2PKH output that locks funds on the sweeping wallet public key hash
570
+ * - 6+ on-chain confirmations of the transaction
571
+ */
572
+ exports.MovedFundsSweepWithMainUtxo = {
573
+ wallet: {
574
+ ecdsaWalletID: "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863",
575
+ pubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
576
+ state: fixtures_1.walletState.Live,
577
+ },
578
+ movedFundsSweepRequest: {
579
+ walletPubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
580
+ txHash: "0x7d5f7d4ae705d6adb8a402e5cd7f25f839a3f3ed243a8961c8ac5887d5aaf528",
581
+ txOutputIndex: 1,
582
+ txOutputValue: 1747020,
583
+ },
584
+ mainUtxo: {
585
+ txHash: "0x7d5f7d4ae705d6adb8a402e5cd7f25f839a3f3ed243a8961c8ac5887d5aaf528",
586
+ txOutputIndex: 0,
587
+ txOutputValue: 873510,
588
+ },
589
+ // https://live.blockcypher.com/btc-testnet/tx/f97ed3704f59bf5ed828d90f04598ea6c1c65a7957befa1f1c175a142c17fff9
590
+ sweepTx: {
591
+ hash: "0xf9ff172c145a171c1ffabe57795ac6c1a68e59040fd928d85ebf594f70d37ef9",
592
+ version: "0x01000000",
593
+ inputVector: "0x027d5f7d4ae705d6adb8a402e5cd7f25f839a3f3ed243a8961c8ac5887d5aaf528" +
594
+ "010000006b483045022100ff95e465ae7f632026e30dfe6c53df8f445066d735f60e" +
595
+ "3ec411fc1f753aa8860220740aa810b18d4ae90653db147b35c83827b942177d74a4" +
596
+ "18aa6d48d387550725012102ee067a0273f2e3ba88d23140a24fdb290f27bbcd0f94" +
597
+ "117a9c65be3911c5c04effffffff7d5f7d4ae705d6adb8a402e5cd7f25f839a3f3ed" +
598
+ "243a8961c8ac5887d5aaf528000000006a473044022058901f5a01c214c3d8ddb224" +
599
+ "6876a6f96646826a87a9669eacd0d36bac73225202206c19cc3fc2e899b36d2e8f2e" +
600
+ "6e6bdaa135e051a14b98990184b9cbcd5a4a1ab8012102ee067a0273f2e3ba88d231" +
601
+ "40a24fdb290f27bbcd0f94117a9c65be3911c5c04effffffff",
602
+ outputVector: "0x0132dd2700000000001976a9147ac2d9378a1c47e589dfb8095ca95ed2140d2726" +
603
+ "88ac",
604
+ locktime: "0x00000000",
605
+ },
606
+ sweepProof: {
607
+ merkleProof: "0x604a912ff9006ac6c20fab23ea943d101f71dd2cf1825b7938673d44ce6f4a8860" +
608
+ "82c37e7e71132ae484a8380fb30b5d66d1421af763203204aa062359ad1b5d9d4c8a" +
609
+ "ebdb88ac4566dbffee27e92048c9e196716373c5939c742941658c0bb4018b30884b" +
610
+ "99f5598071cbae60e280e27883fac38f7a837e33e584ece7103588ddc565ca2ffdfa" +
611
+ "80416d65c783bbe7d163432d7b4c672d1625d44ecc76c310c9626d7cc29488c31358" +
612
+ "7018b2f7b145fae92c8cbe7fa532a68b3b74eb10006c71",
613
+ txIndexInBlock: 7,
614
+ bitcoinHeaders: "0x006000201c234690862d57bafca6380873752eab1eb7ddb1d8d5199afbbce90e00" +
615
+ "000000f2f2fd2d5af10f8f78b90171c37247ffb98e6d6229ce20ffe53767a0ef9783" +
616
+ "27a53e7162ffff001ac346d46f040000204cb5f1b69fce2f3582dc0f459ab4c4a5b2" +
617
+ "408df039c621013e000000000000006a8e27c5f82c300b71b229eb26a9e165d96b8e" +
618
+ "949e1a3346b9fae51abab86a07453f7162ffff001ab12ec161042000203ecc8b4206" +
619
+ "7a7141a6efda4cda949fdc018e4f77fb0e40d81a00000000000000caf5dc93216e0b" +
620
+ "fed194755c1c3139d896878515fd9fa12276486325be351cb7b6407162ffff001a53" +
621
+ "a5715a00600020ca36c03d1f95c68a24bdddd369f0a6125b2e94c54b5c834d570000" +
622
+ "0000000000d10f76d21aaad4472e4d6eb4a95964e19397a4ddb60133efff13195fdc" +
623
+ "44eb84ae427162ffff001a91bdc04804000020f76af131aaa7264739e7ab343ee254" +
624
+ "c3ffef170af99735ef3600000000000000bdd0c4d6202d006bf51fde290c39af0f03" +
625
+ "954574a7118d6963bd90edc1cdaf66c4437162ffff001aa5b23c7d0000002067dd95" +
626
+ "a5b7737427a9ad528d7214c5198514f9b9ba8915877000000000000000075033f3f1" +
627
+ "960f76f53201048967896f037a4dfb1ce17e4f085f130b76314db975487162ffff00" +
628
+ "1ddcf355240020002066d4c3153de53837c8c84427e6d755b84b20888b6479bebace" +
629
+ "b036b000000000b04e55ab011429634c84ee0ad9edf0dea34a1a4adc5d1421a13488" +
630
+ "03457cd43dce457162ffff001aaf43012c",
631
+ },
632
+ chainDifficulty: 16777216,
633
+ };
634
+ /**
635
+ * `MovedFundsSweepP2SHOutput` test data represents a moved funds sweep with
636
+ * the following properties:
637
+ * - 1 P2WPKH input pointing to a moved funds sweep request
638
+ * - 1 P2SH output that locks funds on the sweeping wallet public key hash
639
+ * - 6+ on-chain confirmations of the transaction
640
+ * - This is not a valid moved funds sweep transaction that should be rejected
641
+ * because of the illegal P2SH output.
642
+ */
643
+ exports.MovedFundsSweepP2SHOutput = {
644
+ wallet: {
645
+ ecdsaWalletID: "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863",
646
+ pubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
647
+ state: fixtures_1.walletState.Live,
648
+ },
649
+ movedFundsSweepRequest: {
650
+ walletPubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
651
+ txHash: "0x426518af930297f9d12ce84ac1366e19cf1c797a7515c1a62e0d51193bf6236b",
652
+ txOutputIndex: 0,
653
+ txOutputValue: 1669207,
654
+ },
655
+ mainUtxo: deposit_sweep_1.NO_MAIN_UTXO,
656
+ // https://live.blockcypher.com/btc-testnet/tx/588a0e5e68ec8d3cf80d1190e51a68a431737a33c3a09f16303945dd49e369cd
657
+ sweepTx: {
658
+ hash: "0xcd69e349dd453930169fa0c3337a7331a4681ae590110df83c8dec685e0e8a58",
659
+ version: "0x01000000",
660
+ inputVector: "0x01426518af930297f9d12ce84ac1366e19cf1c797a7515c1a62e0d51193bf6236b" +
661
+ "0000000000ffffffff",
662
+ outputVector: "0x01cf6419000000000017a9147ac2d9378a1c47e589dfb8095ca95ed2140d272687",
663
+ locktime: "0x00000000",
664
+ },
665
+ sweepProof: {
666
+ merkleProof: "0xf6ed9f6ae7235c66ce46e4770aed465ab526375a834bbb651b3e5111ac84e58e42" +
667
+ "6ccb496719c8ba7db243e6e0a7c4f00f1b2a308da73305cb0775a62df99cd26a3996" +
668
+ "c774364ce40571d188d71e0044c42c3d6689b2d9a8a3c23f3a400f69e753330e3fae" +
669
+ "9a71acecb7425e8dbe88cdfd7fc3258bac4e21ca1dec42e5094271c77932609c51fb" +
670
+ "4b82497ed599d3c413c4fd023009716b3e5e885d89c31a1f30bb46106bac1034c65f" +
671
+ "01d80ac402417373daf1fbae0d43041c67b948f47882b27c802a4e791504be4b1b71" +
672
+ "80a788a54659799bedbc712e23a816cae0a12c017b838b1655583043a9c8d30399d3" +
673
+ "f81e7e0fe2121a3c38490845174140a08ff6dc",
674
+ txIndexInBlock: 6,
675
+ bitcoinHeaders: "0x04e00020176fb6202fac66facb3155eebc5d9f26155c5f6074d0d298af01000000" +
676
+ "000000175ff6b2d5fd0ec570f00de4b5b8e45862280926762546123a8c70241e069e" +
677
+ "50d4ad1c62ffff001d7609709f00000020d6a19088bdad8792c1cbc9323b39b5e18f" +
678
+ "c70742a12bae439765000000000000606a7bf8e8cc10bb75f3b404adaf02ca5cc39b" +
679
+ "94cddf6cc56c60081dd5012ffe85b21c62ffff001d0178353b0000002047d4e44d16" +
680
+ "4b7e98c15fd6bfc32c4dbb6bd0ef8bf47012d84006405500000000b3d6911ee43df5" +
681
+ "ba0469ec212fcc6f93914df6dbe332c4c3cbb9c2791548e5f136b71c62ffff001dd3" +
682
+ "769b64040000204fd0926c332cee9eaf06c34458d31e4050a2fd784cf9e91168336b" +
683
+ "d8000000000dd4218907211ade52ff92d6bd555e7dd387adfd25963efee347a16325" +
684
+ "1a43321fbc1c62ffff001dc03a633304e00020732d33ea35d62f9488cff5d64c0d70" +
685
+ "2afd5d88092230ddfcc45f000000000000196283ba24a3f5bad91ef95338aa6d214c" +
686
+ "934f2c1392e39a0447377fe5b0a04be7c01c62ffff001df0be0a27040000206c318b" +
687
+ "23e5c42e86ef3edd080e50c9c233b9f0b6d186bd57e41300000000000021fb8cda20" +
688
+ "0bff4fec1338d85a1e005bb4d729d908a7c5c232ecd0713231d0445ec11c62ed3e03" +
689
+ "1a7b43466e04e00020f416898d79d4a46fa6c54f190ad3d502bad8aa3afdec0714aa" +
690
+ "000000000000000603a5cc15e5906cb4eac9f747869fdc9be856e76a110b4f87da90" +
691
+ "db20f9fbe28fc11c62ed3e031a15dfc3db",
692
+ },
693
+ chainDifficulty: 1,
694
+ };
695
+ /**
696
+ * `MovedFundsSweepProvablyUnspendableOutput` test data represents a moved funds
697
+ * sweep with the following properties:
698
+ * - 1 P2WPKH input pointing to a moved funds sweep request
699
+ * - 1 provably unspendable output with value 0 satoshi
700
+ * - 6+ on-chain confirmations of the transaction
701
+ * - This is not a valid moved funds sweep transaction that should be rejected
702
+ * because of the illegal provably unspendable output.
703
+ */
704
+ exports.MovedFundsSweepProvablyUnspendableOutput = {
705
+ wallet: {
706
+ ecdsaWalletID: "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863",
707
+ pubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
708
+ state: fixtures_1.walletState.Live,
709
+ },
710
+ movedFundsSweepRequest: {
711
+ walletPubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
712
+ txHash: "0xc83c538a70028dd9fd40d7e8be0d05dc414a95927eb52df895e9d0c424786c53",
713
+ txOutputIndex: 0,
714
+ txOutputValue: 1914700,
715
+ },
716
+ mainUtxo: deposit_sweep_1.NO_MAIN_UTXO,
717
+ // https://live.blockcypher.com/btc-testnet/tx/58a7d94d019aa658d00dfa2b5d5bb6b5d627b71afefff2bda5db501a75981fd3
718
+ sweepTx: {
719
+ hash: "0xd31f98751a50dba5bdf2fffe1ab727d6b5b65b5d2bfa0dd058a69a014dd9a758",
720
+ version: "0x01000000",
721
+ inputVector: "0x01c83c538a70028dd9fd40d7e8be0d05dc414a95927eb52df895e9d0c424786c53" +
722
+ "0000000000ffffffff",
723
+ outputVector: "0x010000000000000000176a0f6d6f6e6579627574746f6e2e636f6d0568656c6c6f",
724
+ locktime: "0x00000000",
725
+ },
726
+ sweepProof: {
727
+ merkleProof: "0x905ff7ee49bf6e4290d4045f19317130044e77241b4b38fb3c8c1f1413b8a89574" +
728
+ "ebfb6efeabf05d65f5ad9cc1f8355d2a00a4ca22d7c7a0e0cabc0d6a4c6c00db10e3" +
729
+ "b9f542c6eeb6ec38df9acba0726e452cf50d19b285b5ebb60e2faafb24ea8a2604cc" +
730
+ "8f08c7ab494f4619e240bcc91e91174432a07809ffbfa579e931c16ccbdff6587298" +
731
+ "eb5a02da3f1afc3d5f0ccc06ddad31690cae99d9261218fa4f76e3bd2c3157089f5f" +
732
+ "4586201fccd2ebcc75db72b46fc7a026de0ac5dd7a8245",
733
+ txIndexInBlock: 1,
734
+ bitcoinHeaders: "0x040000201d7a507f86c714fd747e45078096087c65bcabb8e6defa98b433000000" +
735
+ "000000d27279d16f4ef9b10ab2fd0b20be00cf380f9e1d4409d1577822cffbd65989" +
736
+ "d9cb081e62ed3e031ab61e9f5600000020b811a75ec03812f7a0b8580b73282afd59" +
737
+ "6ed9d2b0a9b1c79700000000000000538ba47e9eade7963da25fa640d87a2234489f" +
738
+ "a60741fb2ba89efab52e442b77810d1e62ffff001de0c4afc504e00020342898739f" +
739
+ "1e6ac6e8fe86dc3584fe8f21e5bef01dc714033a20ad3300000000910830b662c217" +
740
+ "5c9a41b3377d072a2b0290d5e44e8a40e038acae63171d216b140f1e62ed3e031a32" +
741
+ "b4b5e000000020345c4a1f645e26da4ec35cbc52543c6871e526b0a6c52070a30200" +
742
+ "00000000002160037975ec5f355cba38f4e9e2a98d8271bba7844a313fb5cb91709a" +
743
+ "4b4c0ee6131e62ffff001da0bddd2404000020667e4f0e217d2f2dd4d5fdcfb27857" +
744
+ "bdd3ae0c643a036897e762a99600000000f189c5237d6d5e15214a7f4d0ad6b82ac1" +
745
+ "522a1b1ee93bc4c76ab169462f26c308161e62ed3e031af4b78af704e00020968648" +
746
+ "2db903e6880604162d4ecedb113e5e0895131dcb608900000000000000d3d4eeb630" +
747
+ "cc71bb0ebf76822c95e19b3d0046ad01b74b6941507b5beaa1cf67db191e62ed3e03" +
748
+ "1a0040a522040000208d370c6f9d47eaf0c1ab779a5b811838a61403def157972e35" +
749
+ "0300000000000080b93554feec4b0c497738f604526bf990bb8924c538f58f030f3a" +
750
+ "ff72bc0347e91b1e62ed3e031a07543bdf",
751
+ },
752
+ chainDifficulty: 5168815,
753
+ };
754
+ /**
755
+ * `MovedFundsSweepMultipleOutputs` test data represents a moved funds
756
+ * sweep with the following properties:
757
+ * - 1 P2WPKH input pointing to a moved funds sweep request
758
+ * - 3 outputs
759
+ * - 6+ on-chain confirmations of the transaction
760
+ * - This is not a valid moved funds sweep transaction that should be rejected
761
+ * because of the illegal outputs count. Only one output is allowed.
762
+ */
763
+ exports.MovedFundsSweepMultipleOutputs = {
764
+ wallet: {
765
+ ecdsaWalletID: "0x4ad6b3ccbca81645865d8d0d575797a15528e98ced22f29a6f906d3259569863",
766
+ pubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
767
+ state: fixtures_1.walletState.Live,
768
+ },
769
+ movedFundsSweepRequest: {
770
+ walletPubKeyHash: "0x7ac2d9378a1c47e589dfb8095ca95ed2140d2726",
771
+ txHash: "0x80653f6e07dabddae14cf08d45475388343763100e4548914d811f373465a42e",
772
+ txOutputIndex: 1,
773
+ txOutputValue: 1795453,
774
+ },
775
+ mainUtxo: deposit_sweep_1.NO_MAIN_UTXO,
776
+ // https://live.blockcypher.com/btc-testnet/tx/e6218018ed1874e73b78e16a8cf4f5016cbc666a3f9179557a84083e3e66ff7c
777
+ sweepTx: {
778
+ hash: "0x7cff663e3e08847a5579913f6a66bc6c01f5f48c6ae1783be77418ed188021e6",
779
+ version: "0x01000000",
780
+ inputVector: "0x0180653f6e07dabddae14cf08d45475388343763100e4548914d811f373465a42e" +
781
+ "0100000000ffffffff",
782
+ outputVector: "0x031c160900000000001976a9142cd680318747b720d67bf4246eb7403b476adb34" +
783
+ "88ac1d160900000000001600148900de8fc6e4cd1db4c7ab0759d28503b4cb0ab11c" +
784
+ "160900000000001976a914af7a841e055fc19bf31acf4cbed5ef548a2cc45388ac",
785
+ locktime: "0x00000000",
786
+ },
787
+ sweepProof: {
788
+ merkleProof: "0x4880d00e942d1e54b9281b138ebe684d82067bd3cc55fbb54a4fe5f441f387b370" +
789
+ "029b1360cd2fff4bd5ce292e35ab1650ee349017a25c6c5c47adfb59a41a6d707207" +
790
+ "bebf7f0449f03b9c068ac503030f77a12b780806567c16c8f7082c85f9c2217e059c" +
791
+ "48d928ee7c0ba8ee7c990e0fbf901826a41e33be7f3285073b00e8002facdc932c69" +
792
+ "016325366f73981195c32096c3a35639cd995779eeeecb2ede16dc684bd43380af42" +
793
+ "f7d20e352ff647a80f628bdeed12c9c229de6c8359c6ef44d02180f40038258359fa" +
794
+ "c75124826493e35533c6a930a1bc7b1f78d40cdd65",
795
+ txIndexInBlock: 14,
796
+ bitcoinHeaders: "0x04200020cd4cfc17f90a5301a51da10d10d5f627644883fb65d399652b00000000" +
797
+ "0000007b4bcb4c4d17edf9e5e07c9eb35bf74d7b0dde10e639581754cd8b4afacc22" +
798
+ "0fd3f34e621ec8001a08d65ede0000e02030fa568bb77672ce00aa73190b6394f247" +
799
+ "3e105bacc1edcba3000000000000001f61df51e500a4df9b322da069d162fd473bb9" +
800
+ "7ae4999febe7c759b39d7779cabcf54e621ec8001a6cee453b000000209ea8ceb25f" +
801
+ "a3854fc8948255f6d47f7c820c5702861ee7e78100000000000000f44e0f8793c2d5" +
802
+ "03817ecc991f1a836e249763ab42936ba98703efde31fedf0518f64e621ec8001a2e" +
803
+ "b8274d00e0ff3f45dd51143f07e88060db80fa4a92e53e8103c138b36b8438790000" +
804
+ "00000000004bbfaeffde81470807f3c9a346479172bf02e4ea62d2f51e0c53163737" +
805
+ "488dc296f64e621ec8001a72dc0b16000000205442a6fc93ed4586bd29360d359c82" +
806
+ "4d1edae51ba1fccb2b2600000000000000853aa96dab6e2e2049b27f0e47157b84b9" +
807
+ "b28e451550cf257b7f929db049686906f74e621ec8001a36e620b104200020e0a49a" +
808
+ "c7a66b57a3a3d6c179ec95ecc62779fe8d9e50115196000000000000005b3438c4f0" +
809
+ "1b35a067f30d26d2ef1c4c5f1d7245e1146402fcba2d0ee9ac9a181af84e621ec800" +
810
+ "1a827753500000c020134645f88ef4c28e11dc8c9cb29eb4a679b9793d6c3b75c4a3" +
811
+ "00000000000000753631af53921164be60b8aee0eb1d76c706ea9bb9cf4f53b8cb65" +
812
+ "830a3e982732f84e621ec8001a10de64d4",
813
+ },
814
+ chainDifficulty: 21461933,
815
+ };