Advertisement
Guest User

Untitled

a guest
Mar 26th, 2018
334
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 45.13 KB | None | 0 0
  1. var api_key = '3b8c4b3c313fc6ba0e69792b0154cc88';
  2. var addr = '';
  3.  
  4. var addresses = [];
  5. var unspentNodes = [];
  6. var hotprivkeys = {};
  7. var hotpubkeys = {};
  8. var coldprivkeys = {};
  9. var coldpubkeys = {};
  10. var ninkipubkeys = {};
  11. var dustcheck = {};
  12. var transactionhex = '';
  13. var addressesWithUnspent = [];
  14. var unspentOutputs = [];
  15. var outputsToSpend = [];
  16. var publicKeys = [];
  17. var privKeys = [];
  18. var pathsToSpend = [];
  19.  
  20. $(document).ready(function () {
  21.  
  22.  
  23. var step = 1;
  24. $("#step1").show();
  25. $("#prgsecwiz").width('25%');
  26. $(".previous").hide();
  27. $(".next").click(function () {
  28.  
  29.  
  30. if (step == 4) {
  31. $("#step5").show();
  32. $("#step4").hide();
  33. $("#listep4").removeClass("active");
  34. $("#listep5").addClass("active");
  35. $("#prgsecwiz").width('100%');
  36. $(".next").hide();
  37. $(".previous").show();
  38. step++;
  39. }
  40.  
  41.  
  42.  
  43. if (step == 3) {
  44. $("#step4").show();
  45. $("#step3").hide();
  46. $("#listep3").removeClass("active");
  47. $("#listep4").addClass("active");
  48. $("#prgsecwiz").width('80%');
  49. $(".next").show();
  50. $(".previous").show();
  51. step++;
  52. }
  53.  
  54. if (step == 2) {
  55. $("#step3").show();
  56. $("#step2").hide();
  57. $("#listep2").removeClass("active");
  58. $("#listep3").addClass("active");
  59. $("#prgsecwiz").width('60%');
  60. $(".next").show();
  61. $(".previous").show();
  62. step++;
  63. }
  64.  
  65. if (step == 1) {
  66. $("#step2").show();
  67. $("#step1").hide();
  68. $("#listep1").removeClass("active");
  69. $("#listep2").addClass("active");
  70. $("#prgsecwiz").width('40%');
  71. $(".previous").show();
  72.  
  73. step++;
  74. }
  75.  
  76. });
  77.  
  78. $(".previous").click(function () {
  79.  
  80. if (step == 2) {
  81. $("#step1").show();
  82. $("#step2").hide();
  83. $("#listep2").removeClass("active");
  84. $("#listep1").addClass("active");
  85. $("#prgsecwiz").width('20%');
  86. $(".previous").hide();
  87. $(".next").show();
  88. step--;
  89. }
  90.  
  91. if (step == 3) {
  92. $("#step2").show();
  93. $("#step3").hide();
  94. $("#listep3").removeClass("active");
  95. $("#listep2").addClass("active");
  96. $("#prgsecwiz").width('40%');
  97. $(".previous").show();
  98. $(".next").show();
  99. step--;
  100. }
  101.  
  102. if (step == 4) {
  103. $("#step3").show();
  104. $("#step4").hide();
  105. $("#listep4").removeClass("active");
  106. $("#listep3").addClass("active");
  107. $("#prgsecwiz").width('60%');
  108. $(".previous").show();
  109. $(".next").show();
  110. step--;
  111. }
  112.  
  113. if (step == 5) {
  114. $("#step4").show();
  115. $("#step5").hide();
  116. $("#listep5").removeClass("active");
  117. $("#listep4").addClass("active");
  118. $("#prgsecwiz").width('80%');
  119. $(".previous").show();
  120. $(".next").show();
  121. step--;
  122. }
  123.  
  124.  
  125. });
  126.  
  127.  
  128.  
  129. $("#btnSend").click(function () {
  130.  
  131.  
  132. for (var i = 0; i < unspentOutputs.length; i++) {
  133.  
  134. var obj = unspentOutputs[i];
  135.  
  136. for (var k = 0; k < obj.length; k++) {
  137.  
  138. //if (obj[k].value > 0) {
  139. var h = obj[k].transaction_hash;
  140. var outind = obj[k].output_index;
  141.  
  142. var addr = addressesWithUnspent[i]
  143.  
  144. var hpriv = hotprivkeys[addr];
  145. var cpriv = coldprivkeys[addr];
  146.  
  147. var hpub = hotpubkeys[addr];
  148. var cpub = coldpubkeys[addr];
  149. var npub = ninkipubkeys[addr];
  150.  
  151. var pubs = [hpub, cpub, npub];
  152. publicKeys.push(pubs);
  153.  
  154. var privs = [hpriv, cpriv];
  155. privKeys.push(privs);
  156.  
  157. outputsToSpend.push({ transactionId: h, outputIndex: outind });
  158.  
  159. pathsToSpend.push(unspentNodes[addr]);
  160. //}
  161.  
  162. }
  163.  
  164. }
  165.  
  166.  
  167. var result = "";
  168.  
  169. $("#prog").hide();
  170. $("#progmess").hide();
  171.  
  172. var amountsToSend = [];
  173. balance = balance * 1.0;
  174. balance = balance - 10000;
  175. amountsToSend.push(balance);
  176.  
  177. var addressToSend = [];
  178. addressToSend.push($("#txtAddress").val());
  179.  
  180. var tx = GetTransactionData(outputsToSpend, pathsToSpend, publicKeys, amountsToSend, addressToSend, privKeys);
  181.  
  182.  
  183. var url = 'https://chain.so/api/v2/send_tx/BTC/' + tx;
  184. $.ajax({
  185. url: url,
  186. type: 'POST',
  187. dataType: 'json',
  188. data: JSON.stringify({
  189. hex: tx
  190. }),
  191. success: function (data) {
  192. $("#sendresults").html("Transaction Id: " + data.transaction_hash);
  193. console.log(data);
  194. },
  195. error: function (data) {
  196. $("#sendresults").html(data.responseJSON.message);
  197. //console.log(data);
  198. }
  199. });
  200.  
  201.  
  202. });
  203.  
  204.  
  205. var nodeCounter = 0;
  206. var knodeCounter = 0;
  207. var currentNode = '';
  208.  
  209. var hotPub = null;
  210. var coldPub = null;
  211. var hninki = null;
  212. var balance = 0;
  213. var cbalance = 0;
  214. var addresses = [];
  215.  
  216. function scanNode(noderoot, callback) {
  217.  
  218. setTimeout(function () {
  219. var path = noderoot + nodeCounter;
  220.  
  221. var address = getAddress(path, hotPub, coldPub, hninki);
  222. $("#progmess").html("Checking " + address + "...");
  223. $(".balance").html((balance/ 100000000) + " BTC");
  224.  
  225.  
  226. jQuery.ajax({
  227. url: " https://chain.so/api/v2/get_address_balance/BTC/" + address,
  228. type: 'GET',
  229. beforeSend: function (xhr) {
  230. xhr.setRequestHeader('Authorization', 'Basic ' + btoa(api_key));
  231. },
  232. success: function (data) {
  233.  
  234. console.log(data);
  235.  
  236.  
  237. if (data.received > 0) {
  238.  
  239. balance += (data.balance * 1);
  240. cbalance += (data.balance * 1);
  241. addresses.push(address);
  242. dustcheck[address] = data.balance;
  243.  
  244. //nodes.push('m/0/0/');
  245.  
  246. } else {
  247.  
  248. if (knodeCounter > 50 && cbalance == 0) {
  249.  
  250. nodeCounter = 50001;
  251.  
  252. }
  253.  
  254. cbalance = 0;
  255. knodeCounter++;
  256. }
  257.  
  258.  
  259. },
  260. async: false
  261. });
  262.  
  263. nodeCounter++;
  264.  
  265. if (nodeCounter <= 50000) {
  266. scanNode(noderoot, callback);
  267. } else {
  268.  
  269. nodeCounter = 0;
  270. knodeCounter = 0;
  271. callback();
  272. }
  273. }, 50);
  274. }
  275.  
  276.  
  277. var friendNodeCounter = 0;
  278.  
  279. function scanFriendNodes(callback) {
  280.  
  281. if (activeFriendNodes.length == 0) {
  282. callback();
  283. }
  284. scanNode(activeFriendNodes[friendNodeCounter], function () {
  285.  
  286. friendNodeCounter++;
  287.  
  288. if (friendNodeCounter < (activeFriendNodes.length)) {
  289. scanFriendNodes(callback);
  290. } else {
  291. callback();
  292. }
  293.  
  294. });
  295. }
  296.  
  297.  
  298. var activeFriendNodes = [];
  299. var estNumberOfFriends = 10;
  300. var activeFriendCounter = 1000;
  301. function scanForActiveFriendNodes(callback) {
  302.  
  303. setTimeout(function () {
  304.  
  305. var path = 'm/0/' + activeFriendCounter + '/0';
  306.  
  307. var address = getAddress(path, hotPub, coldPub, hninki);
  308.  
  309. $("#progmess").html("Checking node " + path);
  310.  
  311. jQuery.ajax({
  312. url: " https://chain.so/api/v2/get_address_balance/BTC/" + address,
  313. type: 'GET',
  314. beforeSend: function (xhr) {
  315. xhr.setRequestHeader('Authorization', 'Basic ' + btoa(api_key));
  316. },
  317. success: function (data) {
  318.  
  319. console.log(data);
  320.  
  321. if (data.received > 0) {
  322.  
  323. activeFriendNodes.push(path);
  324. }
  325. },
  326. async: false
  327. });
  328.  
  329. activeFriendCounter++;
  330.  
  331. if (activeFriendCounter < (1000 + estNumberOfFriends)) {
  332. scanForActiveFriendNodes(callback);
  333. } else {
  334. callback();
  335. }
  336. }, 50);
  337. }
  338.  
  339.  
  340.  
  341. $("#btnSweep").click(function () {
  342. //var canv = $('#qrc canvas')[0];
  343. //var url = canv.canvas.toDataURL('image/png');
  344.  
  345. // canv.toBlob(function (blob) {
  346. // saveAs(blob, "pretty image.png");
  347. // });
  348.  
  349. //return;
  350.  
  351. var test = '';
  352.  
  353. balance = 0;
  354. cbalance = 0;
  355.  
  356. var hot = $("#txtHot").val();
  357. var cold = $("#txtCold").val();
  358. var ninki = $("#txtNinki").val();
  359.  
  360. $("#progstatus").width('20%');
  361. $("#progmess").html("Deriving wallet from seeds...");
  362.  
  363.  
  364. var mhot = mnemonicToHex(hot);
  365. var mcold = mnemonicToHex(cold);
  366.  
  367. hotPub = Bitcoin2.HDWallet.fromSeedHex(mhot);
  368. coldPub = Bitcoin2.HDWallet.fromSeedHex(mcold);
  369. hninki = Bitcoin2.HDWallet.fromBase58(ninki);
  370.  
  371. var nodes = [];
  372.  
  373.  
  374. var publicKeyLookup = {};
  375.  
  376. $("#progstatus").width('40%');
  377. $("#progmess").html("Sweeping friend nodes...");
  378.  
  379. var k = 0;
  380. var i = 0;
  381.  
  382. //scan friend nodes
  383.  
  384. scanForActiveFriendNodes(function () {
  385.  
  386. //sweep external addresses
  387.  
  388.  
  389. scanFriendNodes(function () {
  390.  
  391. $("#progstatus").width('60%');
  392. $("#progmess").html("checking receive external addresses...");
  393.  
  394. scanNode('m/0/0/', function () {
  395.  
  396. $("#progmess").html("Finished sweeping external address node m/0/0/");
  397. $("#progstatus").width('80%');
  398.  
  399. scanNode('m/0/1/', function () {
  400.  
  401. $("#progmess").html("Finished sweeping change address node m/0/1/");
  402. $("#progstatus").width('90%');
  403.  
  404.  
  405.  
  406. var sadd = "";
  407. for (var i = 0; i < addresses.length; i++) {
  408.  
  409. jQuery.ajax({
  410. url: " https://chain.so/api/v2/get_tx_unspent/BTC" + addresses[i],
  411. type: 'GET',
  412. beforeSend: function (xhr) {
  413. xhr.setRequestHeader('Authorization', 'Basic ' + btoa(api_key));
  414. },
  415. success: function (data) {
  416. if (data.length > 0) {
  417. console.log(data);
  418. $("#progmess").html("Checking " + addresses[i] + "...");
  419. unspentOutputs.push(data);
  420. addressesWithUnspent.push(addresses[i]);
  421. }
  422. },
  423. async: false
  424. });
  425.  
  426. }
  427.  
  428.  
  429. $("#progstatus").width('100%');
  430. $("#progmess").html("Address sweep is complete. Click next to send the funds to your address.");
  431.  
  432. });
  433.  
  434.  
  435. });
  436.  
  437. });
  438.  
  439. });
  440.  
  441. });
  442.  
  443.  
  444. });
  445.  
  446.  
  447. //function aMultiSigHashForSigning
  448. //TODO: rename
  449. function MultiSigHashForSigning(publickey1, publickey2, publickey3, index, outputsToSpend, outputsToSend, addressToSend) {
  450.  
  451.  
  452. //this function will create the temporary transaction
  453. //with a single input used to generate the signature
  454. //for the single input
  455.  
  456. //instantiate a new transaction
  457. var tx = new Bitcoin2.Transaction();
  458.  
  459. var ins = [];
  460. var outs = [];
  461.  
  462. //generate the script to sign off on
  463. //using the users hotkey,coldkey and the ninki public key
  464. //2 of...
  465. var script = [0x52];
  466. //hotkey
  467. script.push(33);
  468. script = script.concat(publickey1);
  469. //cold key
  470. script.push(33);
  471. script = script.concat(publickey2);
  472. //ninki key
  473. script.push(33);
  474. script = script.concat(publickey3);
  475. //..3
  476. script.push(0x53);
  477. //..multisig
  478.  
  479. script.push(0xae);
  480.  
  481. //generate the same number of inputs as on the transaction to broadcast
  482. //but replace the other inputs with a zero byte! (thanks satoshi-san)
  483. for (var i = 0; i < outputsToSpend.length; i++) {
  484. var p = outputsToSpend[i].transactionId + ':' + outputsToSpend[i].outputIndex.toString();
  485. tx.addInput(p);
  486. if (i == index) {
  487. tx.ins[i].script = new Bitcoin2.Script(script);
  488. } else {
  489. tx.ins[i].script = new Bitcoin2.Script([0]);
  490. }
  491. }
  492.  
  493. //mirror the outpurs in the transaction to broadcast
  494. var test = '';
  495. for (var i = 0; i < outputsToSend.length; i++) {
  496. var addr = new Bitcoin2.Address(addressToSend[i]);
  497. tx.addOutput(addressToSend[i], outputsToSend[i]);
  498. }
  499.  
  500. //hash the transaction-- this has will be used as an input to the signature function
  501. var txHash = tx.hashTransactionForSignature(tx.ins[index].script, index, 1);
  502.  
  503. return txHash;
  504.  
  505. }
  506.  
  507. //function aGetTransaction
  508. //TODO: rename
  509. //generateas a transaction from a set of keys, outputs, signatures and addresses to send to
  510. function GetTransaction(publickeys, outputsToSpend, outputsToSend, addressToSend, sigs) {
  511.  
  512.  
  513. //create a new transaction
  514. var tx = new Bitcoin2.Transaction();
  515.  
  516. var ins = [];
  517. var outs = [];
  518.  
  519. //generate the scripts to spend the outputs
  520. for (var i = 0; i < outputsToSpend.length; i++) {
  521.  
  522. var len1 = sigs[i][0].length;
  523. var len2 = sigs[i][1].length;
  524. var script = [];
  525.  
  526. //append the signature
  527. var script1 = [];
  528. script1 = script1.concat(sigs[i][0]);
  529. //prepend the length of the signature
  530. script1.unshift(len1);
  531. script1.unshift(0x00);
  532.  
  533. var script2 = [];
  534. script2 = script2.concat(sigs[i][1]);
  535. //prepend the length of the signature
  536. script2.unshift(len2);
  537.  
  538. script = script.concat(script1);
  539. script = script.concat(script2);
  540.  
  541. //push the script used to validate the spend
  542. script.push(0x4c);
  543. script.push(105);
  544. script.push(0x52);
  545. script.push(33);
  546. script = script.concat(publickeys[i][0]);
  547. script.push(33);
  548. script = script.concat(publickeys[i][1]);
  549. script.push(33);
  550. script = script.concat(publickeys[i][2]);
  551. script.push(0x53);
  552. script.push(0xae);
  553.  
  554. //add the input to the transaction referencing the output to spend
  555. var p = outputsToSpend[i].transactionId + ':' + outputsToSpend[i].outputIndex.toString();
  556. tx.addInput(p);
  557.  
  558. //set the script on the input
  559. tx.ins[i].script = new Bitcoin2.Script(script);
  560.  
  561. }
  562.  
  563. //add the outputs to the transaction
  564. for (var i = 0; i < outputsToSend.length; i++) {
  565. tx.addOutput(addressToSend[i], outputsToSend[i]);
  566. }
  567.  
  568. var txHash = Array.apply([], tx.serialize());
  569.  
  570. return txHash;
  571. }
  572.  
  573.  
  574. function GetTransactionData(outputsToSpend, paths, publicKeys, amountsToSend, addressToSend, privKeys) {
  575.  
  576. var derivedPublicKeys = [];
  577. var derivedPrivateKeys = [];
  578.  
  579. var signatures = [];
  580. var hashesForSigning = [];
  581. for (var i = 0; i < outputsToSpend.length; i++) {
  582. var path = paths[i];
  583.  
  584. //derive the hashes for signing off on each input
  585. var hashForSigning = MultiSigHashForSigning(publicKeys[i][0], publicKeys[i][1], publicKeys[i][2], i, outputsToSpend, amountsToSend, addressToSend);
  586. //add to collection so they can be provided to the server later
  587. //this saves the same process having to be done on the server side
  588. hashesForSigning.push(Bitcoin2.convert.bytesToHex(hashForSigning));
  589.  
  590. //get the user's hot private key
  591. var hkey = privKeys[i][0];
  592.  
  593. //sign the input
  594. var sig = hkey.sign(hashForSigning).concat([1]);
  595.  
  596. var hkey2 = privKeys[i][1];
  597.  
  598. //sign the input
  599. var sig2 = hkey2.sign(hashForSigning).concat([1]);
  600.  
  601. var hcsigs = [sig, sig2];
  602. //add the signature
  603. signatures.push(hcsigs);
  604. }
  605.  
  606. //get the transaction and return along with the hashes used to sign
  607. var txn = GetTransaction(publicKeys, outputsToSpend, amountsToSend, addressToSend, signatures);
  608.  
  609. //generate the signatures
  610. //TO DO: check call back?
  611. return Bitcoin2.convert.bytesToHex(txn);
  612. }
  613.  
  614.  
  615. function getAddress(path, hotPub, coldPub, hninki) {
  616.  
  617. var hotKey = deriveChild(path, hotPub);
  618. var coldKey = deriveChild(path, coldPub);
  619. var ninkiKey = deriveChild(path, hninki);
  620.  
  621. //now create the multisig address
  622. var script = [0x52];
  623. script.push(33);
  624. script = script.concat(hotKey.pub.toBytes());
  625. script.push(33);
  626. script = script.concat(coldKey.pub.toBytes());
  627. script.push(33);
  628. script = script.concat(ninkiKey.pub.toBytes());
  629. script.push(0x53);
  630. script.push(0xae);
  631. var address = multiSig(script);
  632.  
  633. unspentNodes[address] = path;
  634. hotprivkeys[address] = hotKey.priv;
  635. hotpubkeys[address] = hotKey.pub.toBytes();
  636. coldprivkeys[address] = coldKey.priv;
  637. coldpubkeys[address] = coldKey.pub.toBytes();
  638. ninkipubkeys[address] = ninkiKey.pub.toBytes();
  639. return address;
  640.  
  641. }
  642.  
  643.  
  644. function deriveChild(path, hdwallet) {
  645.  
  646. var e = path.split('/');
  647. var ret = hdwallet;
  648. // Special cases:
  649. if (path == 'm' || path == 'M' || path == 'm\'' || path == 'M\'') return this;
  650.  
  651. for (var i in e) {
  652. var c = e[i];
  653.  
  654. if (i == 0) {
  655. if (c != 'm') throw new Error("invalid path");
  656. continue;
  657. }
  658.  
  659. var use_private = (c.length > 1) && (c[c.length - 1] == '\'');
  660. var child_index = parseInt(use_private ? c.slice(0, c.length - 1) : c) & 0x7fffffff;
  661.  
  662. if (use_private)
  663. child_index += 0x80000000;
  664.  
  665. ret = ret.derive(child_index);
  666. }
  667.  
  668. return ret;
  669. }
  670.  
  671. //multi sig address hash
  672. function multiSig(rs) {
  673. var x = Bitcoin2.Crypto.RIPEMD160(Bitcoin2.Crypto.SHA256(Bitcoin2.convert.bytesToWordArray(rs)));
  674. x = Bitcoin2.convert.wordArrayToBytes(x);
  675. x.unshift(0x5);
  676. var r = x;
  677. r = Bitcoin2.Crypto.SHA256(Bitcoin2.Crypto.SHA256(Bitcoin2.convert.bytesToWordArray(r)));
  678. var checksum = Bitcoin2.convert.wordArrayToBytes(r).slice(0, 4);
  679. var address = Bitcoin2.base58.encode(x.concat(checksum));
  680. return address;
  681. }
  682.  
  683.  
  684.  
  685. this.wordlist = [
  686. "abandon",
  687. "ability",
  688. "able",
  689. "about",
  690. "above",
  691. "absent",
  692. "absorb",
  693. "abstract",
  694. "absurd",
  695. "abuse",
  696. "access",
  697. "accident",
  698. "account",
  699. "accuse",
  700. "achieve",
  701. "acid",
  702. "acoustic",
  703. "acquire",
  704. "across",
  705. "act",
  706. "action",
  707. "actor",
  708. "actress",
  709. "actual",
  710. "adapt",
  711. "add",
  712. "addict",
  713. "address",
  714. "adjust",
  715. "admit",
  716. "adult",
  717. "advance",
  718. "advice",
  719. "aerobic",
  720. "affair",
  721. "afford",
  722. "afraid",
  723. "again",
  724. "age",
  725. "agent",
  726. "agree",
  727. "ahead",
  728. "aim",
  729. "air",
  730. "airport",
  731. "aisle",
  732. "alarm",
  733. "album",
  734. "alcohol",
  735. "alert",
  736. "alien",
  737. "all",
  738. "alley",
  739. "allow",
  740. "almost",
  741. "alone",
  742. "alpha",
  743. "already",
  744. "also",
  745. "alter",
  746. "always",
  747. "amateur",
  748. "amazing",
  749. "among",
  750. "amount",
  751. "amused",
  752. "analyst",
  753. "anchor",
  754. "ancient",
  755. "anger",
  756. "angle",
  757. "angry",
  758. "animal",
  759. "ankle",
  760. "announce",
  761. "annual",
  762. "another",
  763. "answer",
  764. "antenna",
  765. "antique",
  766. "anxiety",
  767. "any",
  768. "apart",
  769. "apology",
  770. "appear",
  771. "apple",
  772. "approve",
  773. "april",
  774. "arch",
  775. "arctic",
  776. "area",
  777. "arena",
  778. "argue",
  779. "arm",
  780. "armed",
  781. "armor",
  782. "army",
  783. "around",
  784. "arrange",
  785. "arrest",
  786. "arrive",
  787. "arrow",
  788. "art",
  789. "artefact",
  790. "artist",
  791. "artwork",
  792. "ask",
  793. "aspect",
  794. "assault",
  795. "asset",
  796. "assist",
  797. "assume",
  798. "asthma",
  799. "athlete",
  800. "atom",
  801. "attack",
  802. "attend",
  803. "attitude",
  804. "attract",
  805. "auction",
  806. "audit",
  807. "august",
  808. "aunt",
  809. "author",
  810. "auto",
  811. "autumn",
  812. "average",
  813. "avocado",
  814. "avoid",
  815. "awake",
  816. "aware",
  817. "away",
  818. "awesome",
  819. "awful",
  820. "awkward",
  821. "axis",
  822. "baby",
  823. "bachelor",
  824. "bacon",
  825. "badge",
  826. "bag",
  827. "balance",
  828. "balcony",
  829. "ball",
  830. "bamboo",
  831. "banana",
  832. "banner",
  833. "bar",
  834. "barely",
  835. "bargain",
  836. "barrel",
  837. "base",
  838. "basic",
  839. "basket",
  840. "battle",
  841. "beach",
  842. "bean",
  843. "beauty",
  844. "because",
  845. "become",
  846. "beef",
  847. "before",
  848. "begin",
  849. "behave",
  850. "behind",
  851. "believe",
  852. "below",
  853. "belt",
  854. "bench",
  855. "benefit",
  856. "best",
  857. "betray",
  858. "better",
  859. "between",
  860. "beyond",
  861. "bicycle",
  862. "bid",
  863. "bike",
  864. "bind",
  865. "biology",
  866. "bird",
  867. "birth",
  868. "bitter",
  869. "black",
  870. "blade",
  871. "blame",
  872. "blanket",
  873. "blast",
  874. "bleak",
  875. "bless",
  876. "blind",
  877. "blood",
  878. "blossom",
  879. "blouse",
  880. "blue",
  881. "blur",
  882. "blush",
  883. "board",
  884. "boat",
  885. "body",
  886. "boil",
  887. "bomb",
  888. "bone",
  889. "bonus",
  890. "book",
  891. "boost",
  892. "border",
  893. "boring",
  894. "borrow",
  895. "boss",
  896. "bottom",
  897. "bounce",
  898. "box",
  899. "boy",
  900. "bracket",
  901. "brain",
  902. "brand",
  903. "brass",
  904. "brave",
  905. "bread",
  906. "breeze",
  907. "brick",
  908. "bridge",
  909. "brief",
  910. "bright",
  911. "bring",
  912. "brisk",
  913. "broccoli",
  914. "broken",
  915. "bronze",
  916. "broom",
  917. "brother",
  918. "brown",
  919. "brush",
  920. "bubble",
  921. "buddy",
  922. "budget",
  923. "buffalo",
  924. "build",
  925. "bulb",
  926. "bulk",
  927. "bullet",
  928. "bundle",
  929. "bunker",
  930. "burden",
  931. "burger",
  932. "burst",
  933. "bus",
  934. "business",
  935. "busy",
  936. "butter",
  937. "buyer",
  938. "buzz",
  939. "cabbage",
  940. "cabin",
  941. "cable",
  942. "cactus",
  943. "cage",
  944. "cake",
  945. "call",
  946. "calm",
  947. "camera",
  948. "camp",
  949. "can",
  950. "canal",
  951. "cancel",
  952. "candy",
  953. "cannon",
  954. "canoe",
  955. "canvas",
  956. "canyon",
  957. "capable",
  958. "capital",
  959. "captain",
  960. "car",
  961. "carbon",
  962. "card",
  963. "cargo",
  964. "carpet",
  965. "carry",
  966. "cart",
  967. "case",
  968. "cash",
  969. "casino",
  970. "castle",
  971. "casual",
  972. "cat",
  973. "catalog",
  974. "catch",
  975. "category",
  976. "cattle",
  977. "caught",
  978. "cause",
  979. "caution",
  980. "cave",
  981. "ceiling",
  982. "celery",
  983. "cement",
  984. "census",
  985. "century",
  986. "cereal",
  987. "certain",
  988. "chair",
  989. "chalk",
  990. "champion",
  991. "change",
  992. "chaos",
  993. "chapter",
  994. "charge",
  995. "chase",
  996. "chat",
  997. "cheap",
  998. "check",
  999. "cheese",
  1000. "chef",
  1001. "cherry",
  1002. "chest",
  1003. "chicken",
  1004. "chief",
  1005. "child",
  1006. "chimney",
  1007. "choice",
  1008. "choose",
  1009. "chronic",
  1010. "chuckle",
  1011. "chunk",
  1012. "churn",
  1013. "cigar",
  1014. "cinnamon",
  1015. "circle",
  1016. "citizen",
  1017. "city",
  1018. "civil",
  1019. "claim",
  1020. "clap",
  1021. "clarify",
  1022. "claw",
  1023. "clay",
  1024. "clean",
  1025. "clerk",
  1026. "clever",
  1027. "click",
  1028. "client",
  1029. "cliff",
  1030. "climb",
  1031. "clinic",
  1032. "clip",
  1033. "clock",
  1034. "clog",
  1035. "close",
  1036. "cloth",
  1037. "cloud",
  1038. "clown",
  1039. "club",
  1040. "clump",
  1041. "cluster",
  1042. "clutch",
  1043. "coach",
  1044. "coast",
  1045. "coconut",
  1046. "code",
  1047. "coffee",
  1048. "coil",
  1049. "coin",
  1050. "collect",
  1051. "color",
  1052. "column",
  1053. "combine",
  1054. "come",
  1055. "comfort",
  1056. "comic",
  1057. "common",
  1058. "company",
  1059. "concert",
  1060. "conduct",
  1061. "confirm",
  1062. "congress",
  1063. "connect",
  1064. "consider",
  1065. "control",
  1066. "convince",
  1067. "cook",
  1068. "cool",
  1069. "copper",
  1070. "copy",
  1071. "coral",
  1072. "core",
  1073. "corn",
  1074. "correct",
  1075. "cost",
  1076. "cotton",
  1077. "couch",
  1078. "country",
  1079. "couple",
  1080. "course",
  1081. "cousin",
  1082. "cover",
  1083. "coyote",
  1084. "crack",
  1085. "cradle",
  1086. "craft",
  1087. "cram",
  1088. "crane",
  1089. "crash",
  1090. "crater",
  1091. "crawl",
  1092. "crazy",
  1093. "cream",
  1094. "credit",
  1095. "creek",
  1096. "crew",
  1097. "cricket",
  1098. "crime",
  1099. "crisp",
  1100. "critic",
  1101. "crop",
  1102. "cross",
  1103. "crouch",
  1104. "crowd",
  1105. "crucial",
  1106. "cruel",
  1107. "cruise",
  1108. "crumble",
  1109. "crunch",
  1110. "crush",
  1111. "cry",
  1112. "crystal",
  1113. "cube",
  1114. "culture",
  1115. "cup",
  1116. "cupboard",
  1117. "curious",
  1118. "current",
  1119. "curtain",
  1120. "curve",
  1121. "cushion",
  1122. "custom",
  1123. "cute",
  1124. "cycle",
  1125. "dad",
  1126. "damage",
  1127. "damp",
  1128. "dance",
  1129. "danger",
  1130. "daring",
  1131. "dash",
  1132. "daughter",
  1133. "dawn",
  1134. "day",
  1135. "deal",
  1136. "debate",
  1137. "debris",
  1138. "decade",
  1139. "december",
  1140. "decide",
  1141. "decline",
  1142. "decorate",
  1143. "decrease",
  1144. "deer",
  1145. "defense",
  1146. "define",
  1147. "defy",
  1148. "degree",
  1149. "delay",
  1150. "deliver",
  1151. "demand",
  1152. "demise",
  1153. "denial",
  1154. "dentist",
  1155. "deny",
  1156. "depart",
  1157. "depend",
  1158. "deposit",
  1159. "depth",
  1160. "deputy",
  1161. "derive",
  1162. "describe",
  1163. "desert",
  1164. "design",
  1165. "desk",
  1166. "despair",
  1167. "destroy",
  1168. "detail",
  1169. "detect",
  1170. "develop",
  1171. "device",
  1172. "devote",
  1173. "diagram",
  1174. "dial",
  1175. "diamond",
  1176. "diary",
  1177. "dice",
  1178. "diesel",
  1179. "diet",
  1180. "differ",
  1181. "digital",
  1182. "dignity",
  1183. "dilemma",
  1184. "dinner",
  1185. "dinosaur",
  1186. "direct",
  1187. "dirt",
  1188. "disagree",
  1189. "discover",
  1190. "disease",
  1191. "dish",
  1192. "dismiss",
  1193. "disorder",
  1194. "display",
  1195. "distance",
  1196. "divert",
  1197. "divide",
  1198. "divorce",
  1199. "dizzy",
  1200. "doctor",
  1201. "document",
  1202. "dog",
  1203. "doll",
  1204. "dolphin",
  1205. "domain",
  1206. "donate",
  1207. "donkey",
  1208. "donor",
  1209. "door",
  1210. "dose",
  1211. "double",
  1212. "dove",
  1213. "draft",
  1214. "dragon",
  1215. "drama",
  1216. "drastic",
  1217. "draw",
  1218. "dream",
  1219. "dress",
  1220. "drift",
  1221. "drill",
  1222. "drink",
  1223. "drip",
  1224. "drive",
  1225. "drop",
  1226. "drum",
  1227. "dry",
  1228. "duck",
  1229. "dumb",
  1230. "dune",
  1231. "during",
  1232. "dust",
  1233. "dutch",
  1234. "duty",
  1235. "dwarf",
  1236. "dynamic",
  1237. "eager",
  1238. "eagle",
  1239. "early",
  1240. "earn",
  1241. "earth",
  1242. "easily",
  1243. "east",
  1244. "easy",
  1245. "echo",
  1246. "ecology",
  1247. "economy",
  1248. "edge",
  1249. "edit",
  1250. "educate",
  1251. "effort",
  1252. "egg",
  1253. "eight",
  1254. "either",
  1255. "elbow",
  1256. "elder",
  1257. "electric",
  1258. "elegant",
  1259. "element",
  1260. "elephant",
  1261. "elevator",
  1262. "elite",
  1263. "else",
  1264. "embark",
  1265. "embody",
  1266. "embrace",
  1267. "emerge",
  1268. "emotion",
  1269. "employ",
  1270. "empower",
  1271. "empty",
  1272. "enable",
  1273. "enact",
  1274. "end",
  1275. "endless",
  1276. "endorse",
  1277. "enemy",
  1278. "energy",
  1279. "enforce",
  1280. "engage",
  1281. "engine",
  1282. "enhance",
  1283. "enjoy",
  1284. "enlist",
  1285. "enough",
  1286. "enrich",
  1287. "enroll",
  1288. "ensure",
  1289. "enter",
  1290. "entire",
  1291. "entry",
  1292. "envelope",
  1293. "episode",
  1294. "equal",
  1295. "equip",
  1296. "era",
  1297. "erase",
  1298. "erode",
  1299. "erosion",
  1300. "error",
  1301. "erupt",
  1302. "escape",
  1303. "essay",
  1304. "essence",
  1305. "estate",
  1306. "eternal",
  1307. "ethics",
  1308. "evidence",
  1309. "evil",
  1310. "evoke",
  1311. "evolve",
  1312. "exact",
  1313. "example",
  1314. "excess",
  1315. "exchange",
  1316. "excite",
  1317. "exclude",
  1318. "excuse",
  1319. "execute",
  1320. "exercise",
  1321. "exhaust",
  1322. "exhibit",
  1323. "exile",
  1324. "exist",
  1325. "exit",
  1326. "exotic",
  1327. "expand",
  1328. "expect",
  1329. "expire",
  1330. "explain",
  1331. "expose",
  1332. "express",
  1333. "extend",
  1334. "extra",
  1335. "eye",
  1336. "eyebrow",
  1337. "fabric",
  1338. "face",
  1339. "faculty",
  1340. "fade",
  1341. "faint",
  1342. "faith",
  1343. "fall",
  1344. "false",
  1345. "fame",
  1346. "family",
  1347. "famous",
  1348. "fan",
  1349. "fancy",
  1350. "fantasy",
  1351. "farm",
  1352. "fashion",
  1353. "fat",
  1354. "fatal",
  1355. "father",
  1356. "fatigue",
  1357. "fault",
  1358. "favorite",
  1359. "feature",
  1360. "february",
  1361. "federal",
  1362. "fee",
  1363. "feed",
  1364. "feel",
  1365. "female",
  1366. "fence",
  1367. "festival",
  1368. "fetch",
  1369. "fever",
  1370. "few",
  1371. "fiber",
  1372. "fiction",
  1373. "field",
  1374. "figure",
  1375. "file",
  1376. "film",
  1377. "filter",
  1378. "final",
  1379. "find",
  1380. "fine",
  1381. "finger",
  1382. "finish",
  1383. "fire",
  1384. "firm",
  1385. "first",
  1386. "fiscal",
  1387. "fish",
  1388. "fit",
  1389. "fitness",
  1390. "fix",
  1391. "flag",
  1392. "flame",
  1393. "flash",
  1394. "flat",
  1395. "flavor",
  1396. "flee",
  1397. "flight",
  1398. "flip",
  1399. "float",
  1400. "flock",
  1401. "floor",
  1402. "flower",
  1403. "fluid",
  1404. "flush",
  1405. "fly",
  1406. "foam",
  1407. "focus",
  1408. "fog",
  1409. "foil",
  1410. "fold",
  1411. "follow",
  1412. "food",
  1413. "foot",
  1414. "force",
  1415. "forest",
  1416. "forget",
  1417. "fork",
  1418. "fortune",
  1419. "forum",
  1420. "forward",
  1421. "fossil",
  1422. "foster",
  1423. "found",
  1424. "fox",
  1425. "fragile",
  1426. "frame",
  1427. "frequent",
  1428. "fresh",
  1429. "friend",
  1430. "fringe",
  1431. "frog",
  1432. "front",
  1433. "frost",
  1434. "frown",
  1435. "frozen",
  1436. "fruit",
  1437. "fuel",
  1438. "fun",
  1439. "funny",
  1440. "furnace",
  1441. "fury",
  1442. "future",
  1443. "gadget",
  1444. "gain",
  1445. "galaxy",
  1446. "gallery",
  1447. "game",
  1448. "gap",
  1449. "garage",
  1450. "garbage",
  1451. "garden",
  1452. "garlic",
  1453. "garment",
  1454. "gas",
  1455. "gasp",
  1456. "gate",
  1457. "gather",
  1458. "gauge",
  1459. "gaze",
  1460. "general",
  1461. "genius",
  1462. "genre",
  1463. "gentle",
  1464. "genuine",
  1465. "gesture",
  1466. "ghost",
  1467. "giant",
  1468. "gift",
  1469. "giggle",
  1470. "ginger",
  1471. "giraffe",
  1472. "girl",
  1473. "give",
  1474. "glad",
  1475. "glance",
  1476. "glare",
  1477. "glass",
  1478. "glide",
  1479. "glimpse",
  1480. "globe",
  1481. "gloom",
  1482. "glory",
  1483. "glove",
  1484. "glow",
  1485. "glue",
  1486. "goat",
  1487. "goddess",
  1488. "gold",
  1489. "good",
  1490. "goose",
  1491. "gorilla",
  1492. "gospel",
  1493. "gossip",
  1494. "govern",
  1495. "gown",
  1496. "grab",
  1497. "grace",
  1498. "grain",
  1499. "grant",
  1500. "grape",
  1501. "grass",
  1502. "gravity",
  1503. "great",
  1504. "green",
  1505. "grid",
  1506. "grief",
  1507. "grit",
  1508. "grocery",
  1509. "group",
  1510. "grow",
  1511. "grunt",
  1512. "guard",
  1513. "guess",
  1514. "guide",
  1515. "guilt",
  1516. "guitar",
  1517. "gun",
  1518. "gym",
  1519. "habit",
  1520. "hair",
  1521. "half",
  1522. "hammer",
  1523. "hamster",
  1524. "hand",
  1525. "happy",
  1526. "harbor",
  1527. "hard",
  1528. "harsh",
  1529. "harvest",
  1530. "hat",
  1531. "have",
  1532. "hawk",
  1533. "hazard",
  1534. "head",
  1535. "health",
  1536. "heart",
  1537. "heavy",
  1538. "hedgehog",
  1539. "height",
  1540. "hello",
  1541. "helmet",
  1542. "help",
  1543. "hen",
  1544. "hero",
  1545. "hidden",
  1546. "high",
  1547. "hill",
  1548. "hint",
  1549. "hip",
  1550. "hire",
  1551. "history",
  1552. "hobby",
  1553. "hockey",
  1554. "hold",
  1555. "hole",
  1556. "holiday",
  1557. "hollow",
  1558. "home",
  1559. "honey",
  1560. "hood",
  1561. "hope",
  1562. "horn",
  1563. "horror",
  1564. "horse",
  1565. "hospital",
  1566. "host",
  1567. "hotel",
  1568. "hour",
  1569. "hover",
  1570. "hub",
  1571. "huge",
  1572. "human",
  1573. "humble",
  1574. "humor",
  1575. "hundred",
  1576. "hungry",
  1577. "hunt",
  1578. "hurdle",
  1579. "hurry",
  1580. "hurt",
  1581. "husband",
  1582. "hybrid",
  1583. "ice",
  1584. "icon",
  1585. "idea",
  1586. "identify",
  1587. "idle",
  1588. "ignore",
  1589. "ill",
  1590. "illegal",
  1591. "illness",
  1592. "image",
  1593. "imitate",
  1594. "immense",
  1595. "immune",
  1596. "impact",
  1597. "impose",
  1598. "improve",
  1599. "impulse",
  1600. "inch",
  1601. "include",
  1602. "income",
  1603. "increase",
  1604. "index",
  1605. "indicate",
  1606. "indoor",
  1607. "industry",
  1608. "infant",
  1609. "inflict",
  1610. "inform",
  1611. "inhale",
  1612. "inherit",
  1613. "initial",
  1614. "inject",
  1615. "injury",
  1616. "inmate",
  1617. "inner",
  1618. "innocent",
  1619. "input",
  1620. "inquiry",
  1621. "insane",
  1622. "insect",
  1623. "inside",
  1624. "inspire",
  1625. "install",
  1626. "intact",
  1627. "interest",
  1628. "into",
  1629. "invest",
  1630. "invite",
  1631. "involve",
  1632. "iron",
  1633. "island",
  1634. "isolate",
  1635. "issue",
  1636. "item",
  1637. "ivory",
  1638. "jacket",
  1639. "jaguar",
  1640. "jar",
  1641. "jazz",
  1642. "jealous",
  1643. "jeans",
  1644. "jelly",
  1645. "jewel",
  1646. "job",
  1647. "join",
  1648. "joke",
  1649. "journey",
  1650. "joy",
  1651. "judge",
  1652. "juice",
  1653. "jump",
  1654. "jungle",
  1655. "junior",
  1656. "junk",
  1657. "just",
  1658. "kangaroo",
  1659. "keen",
  1660. "keep",
  1661. "ketchup",
  1662. "key",
  1663. "kick",
  1664. "kid",
  1665. "kidney",
  1666. "kind",
  1667. "kingdom",
  1668. "kiss",
  1669. "kit",
  1670. "kitchen",
  1671. "kite",
  1672. "kitten",
  1673. "kiwi",
  1674. "knee",
  1675. "knife",
  1676. "knock",
  1677. "know",
  1678. "lab",
  1679. "label",
  1680. "labor",
  1681. "ladder",
  1682. "lady",
  1683. "lake",
  1684. "lamp",
  1685. "language",
  1686. "laptop",
  1687. "large",
  1688. "later",
  1689. "latin",
  1690. "laugh",
  1691. "laundry",
  1692. "lava",
  1693. "law",
  1694. "lawn",
  1695. "lawsuit",
  1696. "layer",
  1697. "lazy",
  1698. "leader",
  1699. "leaf",
  1700. "learn",
  1701. "leave",
  1702. "lecture",
  1703. "left",
  1704. "leg",
  1705. "legal",
  1706. "legend",
  1707. "leisure",
  1708. "lemon",
  1709. "lend",
  1710. "length",
  1711. "lens",
  1712. "leopard",
  1713. "lesson",
  1714. "letter",
  1715. "level",
  1716. "liar",
  1717. "liberty",
  1718. "library",
  1719. "license",
  1720. "life",
  1721. "lift",
  1722. "light",
  1723. "like",
  1724. "limb",
  1725. "limit",
  1726. "link",
  1727. "lion",
  1728. "liquid",
  1729. "list",
  1730. "little",
  1731. "live",
  1732. "lizard",
  1733. "load",
  1734. "loan",
  1735. "lobster",
  1736. "local",
  1737. "lock",
  1738. "logic",
  1739. "lonely",
  1740. "long",
  1741. "loop",
  1742. "lottery",
  1743. "loud",
  1744. "lounge",
  1745. "love",
  1746. "loyal",
  1747. "lucky",
  1748. "luggage",
  1749. "lumber",
  1750. "lunar",
  1751. "lunch",
  1752. "luxury",
  1753. "lyrics",
  1754. "machine",
  1755. "mad",
  1756. "magic",
  1757. "magnet",
  1758. "maid",
  1759. "mail",
  1760. "main",
  1761. "major",
  1762. "make",
  1763. "mammal",
  1764. "man",
  1765. "manage",
  1766. "mandate",
  1767. "mango",
  1768. "mansion",
  1769. "manual",
  1770. "maple",
  1771. "marble",
  1772. "march",
  1773. "margin",
  1774. "marine",
  1775. "market",
  1776. "marriage",
  1777. "mask",
  1778. "mass",
  1779. "master",
  1780. "match",
  1781. "material",
  1782. "math",
  1783. "matrix",
  1784. "matter",
  1785. "maximum",
  1786. "maze",
  1787. "meadow",
  1788. "mean",
  1789. "measure",
  1790. "meat",
  1791. "mechanic",
  1792. "medal",
  1793. "media",
  1794. "melody",
  1795. "melt",
  1796. "member",
  1797. "memory",
  1798. "mention",
  1799. "menu",
  1800. "mercy",
  1801. "merge",
  1802. "merit",
  1803. "merry",
  1804. "mesh",
  1805. "message",
  1806. "metal",
  1807. "method",
  1808. "middle",
  1809. "midnight",
  1810. "milk",
  1811. "million",
  1812. "mimic",
  1813. "mind",
  1814. "minimum",
  1815. "minor",
  1816. "minute",
  1817. "miracle",
  1818. "mirror",
  1819. "misery",
  1820. "miss",
  1821. "mistake",
  1822. "mix",
  1823. "mixed",
  1824. "mixture",
  1825. "mobile",
  1826. "model",
  1827. "modify",
  1828. "mom",
  1829. "moment",
  1830. "monitor",
  1831. "monkey",
  1832. "monster",
  1833. "month",
  1834. "moon",
  1835. "moral",
  1836. "more",
  1837. "morning",
  1838. "mosquito",
  1839. "mother",
  1840. "motion",
  1841. "motor",
  1842. "mountain",
  1843. "mouse",
  1844. "move",
  1845. "movie",
  1846. "much",
  1847. "muffin",
  1848. "mule",
  1849. "multiply",
  1850. "muscle",
  1851. "museum",
  1852. "mushroom",
  1853. "music",
  1854. "must",
  1855. "mutual",
  1856. "myself",
  1857. "mystery",
  1858. "myth",
  1859. "naive",
  1860. "name",
  1861. "napkin",
  1862. "narrow",
  1863. "nasty",
  1864. "nation",
  1865. "nature",
  1866. "near",
  1867. "neck",
  1868. "need",
  1869. "negative",
  1870. "neglect",
  1871. "neither",
  1872. "nephew",
  1873. "nerve",
  1874. "nest",
  1875. "net",
  1876. "network",
  1877. "neutral",
  1878. "never",
  1879. "news",
  1880. "next",
  1881. "nice",
  1882. "night",
  1883. "noble",
  1884. "noise",
  1885. "nominee",
  1886. "noodle",
  1887. "normal",
  1888. "north",
  1889. "nose",
  1890. "notable",
  1891. "note",
  1892. "nothing",
  1893. "notice",
  1894. "novel",
  1895. "now",
  1896. "nuclear",
  1897. "number",
  1898. "nurse",
  1899. "nut",
  1900. "oak",
  1901. "obey",
  1902. "object",
  1903. "oblige",
  1904. "obscure",
  1905. "observe",
  1906. "obtain",
  1907. "obvious",
  1908. "occur",
  1909. "ocean",
  1910. "october",
  1911. "odor",
  1912. "off",
  1913. "offer",
  1914. "office",
  1915. "often",
  1916. "oil",
  1917. "okay",
  1918. "old",
  1919. "olive",
  1920. "olympic",
  1921. "omit",
  1922. "once",
  1923. "one",
  1924. "onion",
  1925. "online",
  1926. "only",
  1927. "open",
  1928. "opera",
  1929. "opinion",
  1930. "oppose",
  1931. "option",
  1932. "orange",
  1933. "orbit",
  1934. "orchard",
  1935. "order",
  1936. "ordinary",
  1937. "organ",
  1938. "orient",
  1939. "original",
  1940. "orphan",
  1941. "ostrich",
  1942. "other",
  1943. "outdoor",
  1944. "outer",
  1945. "output",
  1946. "outside",
  1947. "oval",
  1948. "oven",
  1949. "over",
  1950. "own",
  1951. "owner",
  1952. "oxygen",
  1953. "oyster",
  1954. "ozone",
  1955. "pact",
  1956. "paddle",
  1957. "page",
  1958. "pair",
  1959. "palace",
  1960. "palm",
  1961. "panda",
  1962. "panel",
  1963. "panic",
  1964. "panther",
  1965. "paper",
  1966. "parade",
  1967. "parent",
  1968. "park",
  1969. "parrot",
  1970. "party",
  1971. "pass",
  1972. "patch",
  1973. "path",
  1974. "patient",
  1975. "patrol",
  1976. "pattern",
  1977. "pause",
  1978. "pave",
  1979. "payment",
  1980. "peace",
  1981. "peanut",
  1982. "pear",
  1983. "peasant",
  1984. "pelican",
  1985. "pen",
  1986. "penalty",
  1987. "pencil",
  1988. "people",
  1989. "pepper",
  1990. "perfect",
  1991. "permit",
  1992. "person",
  1993. "pet",
  1994. "phone",
  1995. "photo",
  1996. "phrase",
  1997. "physical",
  1998. "piano",
  1999. "picnic",
  2000. "picture",
  2001. "piece",
  2002. "pig",
  2003. "pigeon",
  2004. "pill",
  2005. "pilot",
  2006. "pink",
  2007. "pioneer",
  2008. "pipe",
  2009. "pistol",
  2010. "pitch",
  2011. "pizza",
  2012. "place",
  2013. "planet",
  2014. "plastic",
  2015. "plate",
  2016. "play",
  2017. "please",
  2018. "pledge",
  2019. "pluck",
  2020. "plug",
  2021. "plunge",
  2022. "poem",
  2023. "poet",
  2024. "point",
  2025. "polar",
  2026. "pole",
  2027. "police",
  2028. "pond",
  2029. "pony",
  2030. "pool",
  2031. "popular",
  2032. "portion",
  2033. "position",
  2034. "possible",
  2035. "post",
  2036. "potato",
  2037. "pottery",
  2038. "poverty",
  2039. "powder",
  2040. "power",
  2041. "practice",
  2042. "praise",
  2043. "predict",
  2044. "prefer",
  2045. "prepare",
  2046. "present",
  2047. "pretty",
  2048. "prevent",
  2049. "price",
  2050. "pride",
  2051. "primary",
  2052. "print",
  2053. "priority",
  2054. "prison",
  2055. "private",
  2056. "prize",
  2057. "problem",
  2058. "process",
  2059. "produce",
  2060. "profit",
  2061. "program",
  2062. "project",
  2063. "promote",
  2064. "proof",
  2065. "property",
  2066. "prosper",
  2067. "protect",
  2068. "proud",
  2069. "provide",
  2070. "public",
  2071. "pudding",
  2072. "pull",
  2073. "pulp",
  2074. "pulse",
  2075. "pumpkin",
  2076. "punch",
  2077. "pupil",
  2078. "puppy",
  2079. "purchase",
  2080. "purity",
  2081. "purpose",
  2082. "purse",
  2083. "push",
  2084. "put",
  2085. "puzzle",
  2086. "pyramid",
  2087. "quality",
  2088. "quantum",
  2089. "quarter",
  2090. "question",
  2091. "quick",
  2092. "quit",
  2093. "quiz",
  2094. "quote",
  2095. "rabbit",
  2096. "raccoon",
  2097. "race",
  2098. "rack",
  2099. "radar",
  2100. "radio",
  2101. "rail",
  2102. "rain",
  2103. "raise",
  2104. "rally",
  2105. "ramp",
  2106. "ranch",
  2107. "random",
  2108. "range",
  2109. "rapid",
  2110. "rare",
  2111. "rate",
  2112. "rather",
  2113. "raven",
  2114. "raw",
  2115. "razor",
  2116. "ready",
  2117. "real",
  2118. "reason",
  2119. "rebel",
  2120. "rebuild",
  2121. "recall",
  2122. "receive",
  2123. "recipe",
  2124. "record",
  2125. "recycle",
  2126. "reduce",
  2127. "reflect",
  2128. "reform",
  2129. "refuse",
  2130. "region",
  2131. "regret",
  2132. "regular",
  2133. "reject",
  2134. "relax",
  2135. "release",
  2136. "relief",
  2137. "rely",
  2138. "remain",
  2139. "remember",
  2140. "remind",
  2141. "remove",
  2142. "render",
  2143. "renew",
  2144. "rent",
  2145. "reopen",
  2146. "repair",
  2147. "repeat",
  2148. "replace",
  2149. "report",
  2150. "require",
  2151. "rescue",
  2152. "resemble",
  2153. "resist",
  2154. "resource",
  2155. "response",
  2156. "result",
  2157. "retire",
  2158. "retreat",
  2159. "return",
  2160. "reunion",
  2161. "reveal",
  2162. "review",
  2163. "reward",
  2164. "rhythm",
  2165. "rib",
  2166. "ribbon",
  2167. "rice",
  2168. "rich",
  2169. "ride",
  2170. "ridge",
  2171. "rifle",
  2172. "right",
  2173. "rigid",
  2174. "ring",
  2175. "riot",
  2176. "ripple",
  2177. "risk",
  2178. "ritual",
  2179. "rival",
  2180. "river",
  2181. "road",
  2182. "roast",
  2183. "robot",
  2184. "robust",
  2185. "rocket",
  2186. "romance",
  2187. "roof",
  2188. "rookie",
  2189. "room",
  2190. "rose",
  2191. "rotate",
  2192. "rough",
  2193. "round",
  2194. "route",
  2195. "royal",
  2196. "rubber",
  2197. "rude",
  2198. "rug",
  2199. "rule",
  2200. "run",
  2201. "runway",
  2202. "rural",
  2203. "sad",
  2204. "saddle",
  2205. "sadness",
  2206. "safe",
  2207. "sail",
  2208. "salad",
  2209. "salmon",
  2210. "salon",
  2211. "salt",
  2212. "salute",
  2213. "same",
  2214. "sample",
  2215. "sand",
  2216. "satisfy",
  2217. "satoshi",
  2218. "sauce",
  2219. "sausage",
  2220. "save",
  2221. "say",
  2222. "scale",
  2223. "scan",
  2224. "scare",
  2225. "scatter",
  2226. "scene",
  2227. "scheme",
  2228. "school",
  2229. "science",
  2230. "scissors",
  2231. "scorpion",
  2232. "scout",
  2233. "scrap",
  2234. "screen",
  2235. "script",
  2236. "scrub",
  2237. "sea",
  2238. "search",
  2239. "season",
  2240. "seat",
  2241. "second",
  2242. "secret",
  2243. "section",
  2244. "security",
  2245. "seed",
  2246. "seek",
  2247. "segment",
  2248. "select",
  2249. "sell",
  2250. "seminar",
  2251. "senior",
  2252. "sense",
  2253. "sentence",
  2254. "series",
  2255. "service",
  2256. "session",
  2257. "settle",
  2258. "setup",
  2259. "seven",
  2260. "shadow",
  2261. "shaft",
  2262. "shallow",
  2263. "share",
  2264. "shed",
  2265. "shell",
  2266. "sheriff",
  2267. "shield",
  2268. "shift",
  2269. "shine",
  2270. "ship",
  2271. "shiver",
  2272. "shock",
  2273. "shoe",
  2274. "shoot",
  2275. "shop",
  2276. "short",
  2277. "shoulder",
  2278. "shove",
  2279. "shrimp",
  2280. "shrug",
  2281. "shuffle",
  2282. "shy",
  2283. "sibling",
  2284. "sick",
  2285. "side",
  2286. "siege",
  2287. "sight",
  2288. "sign",
  2289. "silent",
  2290. "silk",
  2291. "silly",
  2292. "silver",
  2293. "similar",
  2294. "simple",
  2295. "since",
  2296. "sing",
  2297. "siren",
  2298. "sister",
  2299. "situate",
  2300. "six",
  2301. "size",
  2302. "skate",
  2303. "sketch",
  2304. "ski",
  2305. "skill",
  2306. "skin",
  2307. "skirt",
  2308. "skull",
  2309. "slab",
  2310. "slam",
  2311. "sleep",
  2312. "slender",
  2313. "slice",
  2314. "slide",
  2315. "slight",
  2316. "slim",
  2317. "slogan",
  2318. "slot",
  2319. "slow",
  2320. "slush",
  2321. "small",
  2322. "smart",
  2323. "smile",
  2324. "smoke",
  2325. "smooth",
  2326. "snack",
  2327. "snake",
  2328. "snap",
  2329. "sniff",
  2330. "snow",
  2331. "soap",
  2332. "soccer",
  2333. "social",
  2334. "sock",
  2335. "soda",
  2336. "soft",
  2337. "solar",
  2338. "soldier",
  2339. "solid",
  2340. "solution",
  2341. "solve",
  2342. "someone",
  2343. "song",
  2344. "soon",
  2345. "sorry",
  2346. "sort",
  2347. "soul",
  2348. "sound",
  2349. "soup",
  2350. "source",
  2351. "south",
  2352. "space",
  2353. "spare",
  2354. "spatial",
  2355. "spawn",
  2356. "speak",
  2357. "special",
  2358. "speed",
  2359. "spell",
  2360. "spend",
  2361. "sphere",
  2362. "spice",
  2363. "spider",
  2364. "spike",
  2365. "spin",
  2366. "spirit",
  2367. "split",
  2368. "spoil",
  2369. "sponsor",
  2370. "spoon",
  2371. "sport",
  2372. "spot",
  2373. "spray",
  2374. "spread",
  2375. "spring",
  2376. "spy",
  2377. "square",
  2378. "squeeze",
  2379. "squirrel",
  2380. "stable",
  2381. "stadium",
  2382. "staff",
  2383. "stage",
  2384. "stairs",
  2385. "stamp",
  2386. "stand",
  2387. "start",
  2388. "state",
  2389. "stay",
  2390. "steak",
  2391. "steel",
  2392. "stem",
  2393. "step",
  2394. "stereo",
  2395. "stick",
  2396. "still",
  2397. "sting",
  2398. "stock",
  2399. "stomach",
  2400. "stone",
  2401. "stool",
  2402. "story",
  2403. "stove",
  2404. "strategy",
  2405. "street",
  2406. "strike",
  2407. "strong",
  2408. "struggle",
  2409. "student",
  2410. "stuff",
  2411. "stumble",
  2412. "style",
  2413. "subject",
  2414. "submit",
  2415. "subway",
  2416. "success",
  2417. "such",
  2418. "sudden",
  2419. "suffer",
  2420. "sugar",
  2421. "suggest",
  2422. "suit",
  2423. "summer",
  2424. "sun",
  2425. "sunny",
  2426. "sunset",
  2427. "super",
  2428. "supply",
  2429. "supreme",
  2430. "sure",
  2431. "surface",
  2432. "surge",
  2433. "surprise",
  2434. "surround",
  2435. "survey",
  2436. "suspect",
  2437. "sustain",
  2438. "swallow",
  2439. "swamp",
  2440. "swap",
  2441. "swarm",
  2442. "swear",
  2443. "sweet",
  2444. "swift",
  2445. "swim",
  2446. "swing",
  2447. "switch",
  2448. "sword",
  2449. "symbol",
  2450. "symptom",
  2451. "syrup",
  2452. "system",
  2453. "table",
  2454. "tackle",
  2455. "tag",
  2456. "tail",
  2457. "talent",
  2458. "talk",
  2459. "tank",
  2460. "tape",
  2461. "target",
  2462. "task",
  2463. "taste",
  2464. "tattoo",
  2465. "taxi",
  2466. "teach",
  2467. "team",
  2468. "tell",
  2469. "ten",
  2470. "tenant",
  2471. "tennis",
  2472. "tent",
  2473. "term",
  2474. "test",
  2475. "text",
  2476. "thank",
  2477. "that",
  2478. "theme",
  2479. "then",
  2480. "theory",
  2481. "there",
  2482. "they",
  2483. "thing",
  2484. "this",
  2485. "thought",
  2486. "three",
  2487. "thrive",
  2488. "throw",
  2489. "thumb",
  2490. "thunder",
  2491. "ticket",
  2492. "tide",
  2493. "tiger",
  2494. "tilt",
  2495. "timber",
  2496. "time",
  2497. "tiny",
  2498. "tip",
  2499. "tired",
  2500. "tissue",
  2501. "title",
  2502. "toast",
  2503. "tobacco",
  2504. "today",
  2505. "toddler",
  2506. "toe",
  2507. "together",
  2508. "toilet",
  2509. "token",
  2510. "tomato",
  2511. "tomorrow",
  2512. "tone",
  2513. "tongue",
  2514. "tonight",
  2515. "tool",
  2516. "tooth",
  2517. "top",
  2518. "topic",
  2519. "topple",
  2520. "torch",
  2521. "tornado",
  2522. "tortoise",
  2523. "toss",
  2524. "total",
  2525. "tourist",
  2526. "toward",
  2527. "tower",
  2528. "town",
  2529. "toy",
  2530. "track",
  2531. "trade",
  2532. "traffic",
  2533. "tragic",
  2534. "train",
  2535. "transfer",
  2536. "trap",
  2537. "trash",
  2538. "travel",
  2539. "tray",
  2540. "treat",
  2541. "tree",
  2542. "trend",
  2543. "trial",
  2544. "tribe",
  2545. "trick",
  2546. "trigger",
  2547. "trim",
  2548. "trip",
  2549. "trophy",
  2550. "trouble",
  2551. "truck",
  2552. "true",
  2553. "truly",
  2554. "trumpet",
  2555. "trust",
  2556. "truth",
  2557. "try",
  2558. "tube",
  2559. "tuition",
  2560. "tumble",
  2561. "tuna",
  2562. "tunnel",
  2563. "turkey",
  2564. "turn",
  2565. "turtle",
  2566. "twelve",
  2567. "twenty",
  2568. "twice",
  2569. "twin",
  2570. "twist",
  2571. "two",
  2572. "type",
  2573. "typical",
  2574. "ugly",
  2575. "umbrella",
  2576. "unable",
  2577. "unaware",
  2578. "uncle",
  2579. "uncover",
  2580. "under",
  2581. "undo",
  2582. "unfair",
  2583. "unfold",
  2584. "unhappy",
  2585. "uniform",
  2586. "unique",
  2587. "unit",
  2588. "universe",
  2589. "unknown",
  2590. "unlock",
  2591. "until",
  2592. "unusual",
  2593. "unveil",
  2594. "update",
  2595. "upgrade",
  2596. "uphold",
  2597. "upon",
  2598. "upper",
  2599. "upset",
  2600. "urban",
  2601. "urge",
  2602. "usage",
  2603. "use",
  2604. "used",
  2605. "useful",
  2606. "useless",
  2607. "usual",
  2608. "utility",
  2609. "vacant",
  2610. "vacuum",
  2611. "vague",
  2612. "valid",
  2613. "valley",
  2614. "valve",
  2615. "van",
  2616. "vanish",
  2617. "vapor",
  2618. "various",
  2619. "vast",
  2620. "vault",
  2621. "vehicle",
  2622. "velvet",
  2623. "vendor",
  2624. "venture",
  2625. "venue",
  2626. "verb",
  2627. "verify",
  2628. "version",
  2629. "very",
  2630. "vessel",
  2631. "veteran",
  2632. "viable",
  2633. "vibrant",
  2634. "vicious",
  2635. "victory",
  2636. "video",
  2637. "view",
  2638. "village",
  2639. "vintage",
  2640. "violin",
  2641. "virtual",
  2642. "virus",
  2643. "visa",
  2644. "visit",
  2645. "visual",
  2646. "vital",
  2647. "vivid",
  2648. "vocal",
  2649. "voice",
  2650. "void",
  2651. "volcano",
  2652. "volume",
  2653. "vote",
  2654. "voyage",
  2655. "wage",
  2656. "wagon",
  2657. "wait",
  2658. "walk",
  2659. "wall",
  2660. "walnut",
  2661. "want",
  2662. "warfare",
  2663. "warm",
  2664. "warrior",
  2665. "wash",
  2666. "wasp",
  2667. "waste",
  2668. "water",
  2669. "wave",
  2670. "way",
  2671. "wealth",
  2672. "weapon",
  2673. "wear",
  2674. "weasel",
  2675. "weather",
  2676. "web",
  2677. "wedding",
  2678. "weekend",
  2679. "weird",
  2680. "welcome",
  2681. "west",
  2682. "wet",
  2683. "whale",
  2684. "what",
  2685. "wheat",
  2686. "wheel",
  2687. "when",
  2688. "where",
  2689. "whip",
  2690. "whisper",
  2691. "wide",
  2692. "width",
  2693. "wife",
  2694. "wild",
  2695. "will",
  2696. "win",
  2697. "window",
  2698. "wine",
  2699. "wing",
  2700. "wink",
  2701. "winner",
  2702. "winter",
  2703. "wire",
  2704. "wisdom",
  2705. "wise",
  2706. "wish",
  2707. "witness",
  2708. "wolf",
  2709. "woman",
  2710. "wonder",
  2711. "wood",
  2712. "wool",
  2713. "word",
  2714. "work",
  2715. "world",
  2716. "worry",
  2717. "worth",
  2718. "wrap",
  2719. "wreck",
  2720. "wrestle",
  2721. "wrist",
  2722. "write",
  2723. "wrong",
  2724. "yard",
  2725. "year",
  2726. "yellow",
  2727. "you",
  2728. "young",
  2729. "youth",
  2730. "zebra",
  2731. "zero",
  2732. "zone",
  2733. "zoo"
  2734. ];
  2735.  
  2736.  
  2737.  
  2738.  
  2739. function mnemonicToHex(mnemonic) {
  2740. var words = mnemonic.split(' ')
  2741.  
  2742. if (words.length % 3 !== 0) return false
  2743.  
  2744. var wordlist = this.wordlist
  2745. var belongToList = words.every(function (word) {
  2746. return wordlist.indexOf(word) > -1
  2747. })
  2748.  
  2749. if (!belongToList) return false
  2750.  
  2751. // convert word indices to 11 bit binary strings
  2752. var bits = words.map(function (word) {
  2753. var index = wordlist.indexOf(word)
  2754. return lpad(index.toString(2), '0', 11)
  2755. }).join('')
  2756.  
  2757. // split the binary string into ENT/CS
  2758. var dividerIndex = Math.floor(bits.length / 33) * 32
  2759. var entropy = bits.slice(0, dividerIndex)
  2760. var checksum = bits.slice(dividerIndex)
  2761.  
  2762. // calculate the checksum and compare
  2763. var entropyBytes = entropy.match(/(.{1,8})/g).map(function (bin) {
  2764. return parseInt(bin, 2)
  2765. })
  2766.  
  2767.  
  2768. return Bitcoin2.convert.bytesToHex(entropyBytes);
  2769.  
  2770. }
  2771.  
  2772. function bytesToBinary(bytes) {
  2773. return bytes.map(function (x) {
  2774. return lpad(x.toString(2), '0', 8)
  2775. }).join('');
  2776. }
  2777.  
  2778. function lpad(str, padString, length) {
  2779. while (str.length < length) str = padString + str;
  2780. return str;
  2781. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement