{"_id":"@atomicport/mona","name":"@atomicport/mona","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@atomicport/mona","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":["mona","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":{"web3":"^1.8.1","@mempool/mempool.js":"^2.3.0","bip65":"^1.0.3","bitcoinjs-lib":"^6.1.0","coininfo":"^5.2.1","ecpair":"^2.1.0","tiny-secp256k1":"^2.2.1","varuint-bitcoin":"^1.1.2"},"gitHead":"ae5b63cc927bebb64c8eb4647afd6a1d0a633a03","_id":"@atomicport/mona@0.0.1","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-FQScZKGqQ7IX6EID6v9bh0uDBI72I/nScu7Kvr5tqt9anI9fXu8cD9KV/Fq43cnSShiY57KrhlMxpY8Rwx52Jg==","shasum":"f4974a4de99e19913f3d1f566dc6ed78b03ed9e5","tarball":"https://registry.npmjs.org/@atomicport/mona/-/mona-0.0.1.tgz","fileCount":3,"unpackedSize":4550,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCyRRTBl2yQR8kv7WZywxRvh4VDWhckKgPFar4kCmbIswIgWKclF3IIpi54j/l7FFf0VSO1P9OVkomN5SIRAG8FGtY="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6letACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmra9g/+NvVzIgnG4MeUVBJrP3FhxMAO5AabW9q5rECSygfOmaz0rwMn\r\neehvc8KG+8ZQh5RhHAu+H6VL3dkU/RJDGflUDbkz6/bnHQ4l1CtOwHEesnKQ\r\nHoxktkf9pDFTAd8k/B+raMvNfARy7xpM8nuMnlYw7NZ3MeXaf8iC2Q5UfpkL\r\nC05JaU/li/hWo6vNY/iWLu+94pK1VO30OLE5meKwash9eXiJ7c3u3qYCDbYJ\r\nhHEjHSO7TkWOAWQYCLAm4vRKcuZWIsj+YR83JDK+u/5dkzy/xk/lLewacToQ\r\n7d9r94R4CwX8MwhVN5aHutTed2teIo0a+jZMu2Q0v+HyGT+ldhcIxuNYlYY/\r\nRclVKEptmDg6QWUIanSNCGDbWlA+BHoPv0IVFxtfj6ltSyF2SHXThq13PsAh\r\n+NKTZdyVI+SkyzHvYOQ+z7ZPhIjnk9NIe+pynMTgI7E70gWp++sXF5ikQD97\r\nDYzECfPD+6i0GciOjlHR5FtTdCuVP4BntJo8vyPWMqKWQBCLLF1OV37u2dtp\r\n5yJwosCsoe9Ujg3Q41nazUNv/9xT9JhrxbVZP5WM2MaU/hml2ylTcjrJWC6x\r\nM0RcJwcitFcX95YKXlDqYzCrbWATu3haYz0fKgQtwuLyVcr5MeQEfLMt3A0/\r\nJ+awZ10uCuBDucf3iULj1kf+UajFldb2Qgk=\r\n=k/Bn\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/mona_0.0.1_1676302253075_0.35688457428170794"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-13T15:30:52.981Z","0.0.1":"2023-02-13T15:30:53.208Z","modified":"2023-02-13T15:30:53.389Z"},"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":["mona","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/mona\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 web3 @mempool/mempool.js bip65 bitcoinjs-lib@6 coininfo ecpair tiny-secp256k1 varuint-bitcoin @atomic-port/mona\n```\n\n**yarn**\n\n```\nyarn add web3 @mempool/mempool.js bip65 bitcoinjs-lib@6 coininfo ecpair tiny-secp256k1 varuint-bitcoin @atomic-port/mona\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/mona/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/mona/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 mona](https://monacoin.org/)\n","readmeFilename":"README.md"}