{"_id":"@atomicport/bitcoin","name":"@atomicport/bitcoin","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@atomicport/bitcoin","version":"0.0.1","description":"Support Cross-Chain-Swap with HTLC on any blockchains","main":"./dist/cjs/index.js","module":"./dist/esm/index.js","types":"./dist/esm/index.d.ts","license":"MIT","author":{"name":"Symbol Blockchain Community"},"private":false,"keywords":["bitcoin","blockchain","cross-chain-swap","htlc"],"contributors":[{"name":"faunsu19000"},{"name":"0x070696E65"}],"repository":{"type":"git","url":"git+https://github.com/ymuichiro/atomic-port.git"},"engines":{"node":">=12.22.1"},"publishConfig":{"access":"public"},"bugs":{"url":"https://github.com/ymuichiro/atomic-port/issues"},"homepage":"https://github.com/ymuichiro/atomic-port","scripts":{"build":"npm run pre-build && npx tsc -p ./tsconfig.json && npx tsc -p ./tsconfig.esm.json","pre-build":"eslint './src/**/*.{ts, js, json}' && prettier --write src"},"peerDependencies":{"@mempool/mempool.js":"^2.3.0","bip65":"^1.0.3","bitcoinjs-lib":"^6.1.0","ecpair":"^2.1.0","tiny-secp256k1":"^2.2.1","varuint-bitcoin":"^1.1.2"},"gitHead":"ae5b63cc927bebb64c8eb4647afd6a1d0a633a03","_id":"@atomicport/bitcoin@0.0.1","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-xjq4D0HdXVaNzY+U972qxbx+yRIbI1LAbb80mSupNb1TmlqiHvW+vkdev9s9EZlBeKRFQ6944l4njaImuSSpZQ==","shasum":"1f0dc09f450256517845333e0f3eb07437a76fcd","tarball":"https://registry.npmjs.org/@atomicport/bitcoin/-/bitcoin-0.0.1.tgz","fileCount":19,"unpackedSize":36528,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCv88vG1uarwUQR2INQtOD7Uu89pGeA4rlv0Ddh6Se6RAIhAPJ8JKiXbuviiZWgKaM8Y33txBE/k4i8V9xYPIj5dalQ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6leUACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq2kg//Y1jUBuLX3p1WqgEGCeHGr1HGgZCxI8ygwHyAPhv2xEXkm+e9\r\nFpUFHWncPPnHZ6qOfl9yvg7OV2sT0jTniNXXMvgZeEakmqMaZMujVPHQAFgG\r\nT16Wm3NbEpaBKcDifyMYzbk0Lgb3jgRNiWRWIMrkTxI/r72qHY/waJscBNQI\r\n6GdHl99acyKvRzlPVnPwbDLGC2MFEam13SyIRIewWzd/iLE2LEYoUjJHy51U\r\nr9uz7uZHCGxBVKw7mTkEGrBEFwPzHtxmfGAZctp0ls4hZUHs3KAKwvaruxfG\r\ntgoWq9+r2qO5nqInXHJtj12Vs62mYSz0fQQXzk6M49McixsK9Uc4dZSwPmhl\r\nhMaxFzeJ5RfPLlLqOOo74b3oAf4kDARaoFiNdkj59bOTP7pMoVbyo1LJpPUa\r\nuFzVxsbC/z/eNYhLiO2FUrAcafDYb/MkTwOT6sK2J4q03HhGbdsIY1DrW0Op\r\n5opnPaq3fQnEYoxEftHC6iAeL3xB8F1TboiIKxt2Bk0mioN595dgRdb4vo5n\r\nHmmDFwaKC6qSqfOh+PYRhYYlZmDv9rXju9VeMOq5gQuK0bB5nyABfss+cKte\r\nA8GeDt8hwcuQRcGkGCnhTIimUV7hexWCIB375YGWslgpqHxw80C7N3ig2yeM\r\nO2Vir4V3pr/edUX064jD2qEPuU+G0GezKfo=\r\n=XAkE\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ymuichiro","email":"ym.u.ichiro@gmail.com"},"directories":{},"maintainers":[{"name":"ymuichiro","email":"ym.u.ichiro@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/bitcoin_0.0.1_1676302228070_0.39160121566130224"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-13T15:30:27.732Z","0.0.1":"2023-02-13T15:30:28.217Z","modified":"2023-02-13T15:30:28.427Z"},"maintainers":[{"name":"ymuichiro","email":"ym.u.ichiro@gmail.com"}],"description":"Support Cross-Chain-Swap with HTLC on any blockchains","homepage":"https://github.com/ymuichiro/atomic-port","keywords":["bitcoin","blockchain","cross-chain-swap","htlc"],"repository":{"type":"git","url":"git+https://github.com/ymuichiro/atomic-port.git"},"contributors":[{"name":"faunsu19000"},{"name":"0x070696E65"}],"author":{"name":"Symbol Blockchain Community"},"bugs":{"url":"https://github.com/ymuichiro/atomic-port/issues"},"license":"MIT","readme":"<div align=\"center\">\n<picture>\n  <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://user-images.githubusercontent.com/47295014/218366041-d07fdf06-1b72-4c6d-8fa2-89dc8266553d.png\">\n  <source media=\"(prefers-color-scheme: light)\" srcset=\"https://user-images.githubusercontent.com/47295014/218366194-eee5969d-3c4c-4445-9303-5368c66aac9a.png\">\n  <img alt=\"logo\" src=\"https://user-images.githubusercontent.com/47295014/218366194-eee5969d-3c4c-4445-9303-5368c66aac9a.png\">\n</picture>\n</div>\n\n[Go to top](#../../README.md)\n\n# @atomic-port/bitcoin\n\nThis package is for HTLC transactions between the any blockchains. HTLC allows direct transactions between different chains. Usage and examples are shown below.\n\n<br>\n\n## Test is now open to the public.\n\nTransactions on each chain in this library are currently available only on the testnet.\nIf you wish to use it in a production environment, please change the network and other parameters.\n\n<br>\n\n## Introduction\n\nInstall the necessary libraries\n\n**npm**\n\n```\nnpm install --save @mempool/mempool.js bip65 bitcoinjs-lib@6 ecpair tiny-secp256k1 varuint-bitcoin @atomic-port/bitcoin\n```\n\n**yarn**\n\n```\nyarn add @mempool/mempool.js bip65 bitcoinjs-lib@6 ecpair tiny-secp256k1 varuint-bitcoin @atomic-port/bitcoin\n```\n\nHTLC issues a secret and key in advance and uses this to issue a secret lock.\nWhen both parties agree to the transaction, the secret and key are exchanged separately, and the key is used to receive a token. This is how the cross-chain swap is performed.\n\n<br>\n\n## Issue a secret lock\n\nYou can publish using this package with the following operations.\nThe output hashPair contains a secret and a proof. The secret is shared in advance, and the proof is issued at a mutually agreed timing.\n\n[lock.ts](../../examples/bitcoin/src/lock.ts)\n\n<br>\n\n## Unlocking by Proof\n\nWith a secret lock, locked assets are withdrawn through a secret proof transaction.\n\n[withDraw.ts](../../examples/bitcoin/src/withDraw.ts)\n\n<br>\n\nFor more detailed examples, please check the sample collection below\n[examples](examples/README.md)\n\n<br>\n\n## More Documents\n\n- [about bitcoin](https://bitcoin.org/)\n","readmeFilename":"README.md"}