{"_id":"@atomicport/evm","name":"@atomicport/evm","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@atomicport/evm","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":["evm","ethereum","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"},"gitHead":"ae5b63cc927bebb64c8eb4647afd6a1d0a633a03","_id":"@atomicport/evm@0.0.1","_nodeVersion":"16.17.0","_npmVersion":"8.15.0","dist":{"integrity":"sha512-9lXZpkescHYg0HuQzNNda2RVKEms9cf92Evq+cVCXRrauwxagiGMBGTD7u44vJAUizy4wkcT9cUcbpx7m3TfqQ==","shasum":"1ecc26d7cf3af63d13443aeb060fe9ba11ee6e63","tarball":"https://registry.npmjs.org/@atomicport/evm/-/evm-0.0.1.tgz","fileCount":41,"unpackedSize":9848332,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCWGK33srIogs7tD3ATeJvT3jkcyY0uu5RL8IVYiduoEQIhAN03w/uPwiQAPLtt8iBUCuVP/AsxoSBdl6+pdp/waDKJ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6legACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoGMRAAluOO6Tp9XXQHQ0bcIE3DKjBHFu6hGuR6c8eesWS/bgsjvksq\r\n499Pb/A1hJqBmPw4vh+lmLjh5VUYu/s6R04OcTITyk87IcOfBU39CgJCIW8p\r\nZjzsJDC6qBTNHIZ38g5yybbUo9LVBRamJFKxkCOV0g3WX1YcZgcI3t6IhPAD\r\nEReoEm/1Fnnurkgph5Is/RTwT26tj/t6VxKzJHqcCF7JNH1bFTRdXxHy6l/c\r\nqIQ0xzGszq61RnxZgwwgO+iAd8Q5khJ1Be+NdFY/rWWpGmtMA9rr6NJsaBN7\r\nqP0hC8CpZUi8F+XDrcXwUilOfpmTwItOzzBJJvmXubyMhVBJXjTZD29X8+nY\r\ntQIM1dsAgs4lhM6uiMi0DsquJ9gT9Kcj7wUKTpKH84bxfUO6r5X/J3vmqb2T\r\nO+sJWJWBO/M8ORJ4vR6ZFoqbv5sv4ZqUkyR+eHu4mcGy7Wl+cPWJEGhsHF/6\r\n/4B5EpxtWCBHygC0WOBxY6XhD1sih0dgxaE75n/Mc7H5sIocd7lJ7TaT3EGr\r\njoWytNb1CumW3by37Cjg0cDiwIHqnHA/mx0XMjpAQZA76aQLa82VFYUfeshp\r\nchOtAYaS+uuFDZ2VUIjjKFtqA6bS87tvkU4QxAGRI7PECskxjbH2KW3gAV6p\r\nub+wY6UgRaQuE56/O0bzp0aouVrCyJeB4VA=\r\n=7KPM\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/evm_0.0.1_1676302240054_0.3696948925604979"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-13T15:30:39.979Z","0.0.1":"2023-02-13T15:30:40.368Z","modified":"2023-02-13T15:30:40.560Z"},"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":["evm","ethereum","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/evm\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### Deployed Contracts\n\n#### Sepolia （TestNet）\n\n##### native\n\n- Endpoint: https://sepolia.infura.io/v3/85eb73cb20fc46058b5044657ed33efd\n- Contract address: 0x549DEC2d00C3db272F337Ac4874503Ecf5205955\n\n##### ERC20\n\n- Endpoint: https://sepolia.infura.io/v3/85eb73cb20fc46058b5044657ed33efd\n- Contract address: 0xbD674927a77f4Ca6f01Ac470A33747E060C3Ccd0\n\n##### ERC721\n\n- Endpoint: https://sepolia.infura.io/v3/85eb73cb20fc46058b5044657ed33efd\n- Contract address: 0x4Bf07078493464447732B2a23126697b1C85DF9F\n\n#### Rinkeby （TestNet）\n\n##### native\n\n- Endpoint: https://rpc.ankr.com/eth_rinkeby\n- Contract address: 0x97ED40C207bf3B6dE4DB27E37E1989f3756E71f4\n\n##### ERC20\n\n- Endpoint: https://rpc.ankr.com/eth_rinkeby\n- Contract address: 0x5F30A927063AA056Ee8BA93Be1175f7485c89Cac\n\n##### ERC721\n\n- Endpoint: https://rpc.ankr.com/eth_rinkeby\n- Contract address: 0x3b1B7AB12c115148B4bbe14E8327Da6c1DfD70cd\n\n#### Matic （TestNet）\n\n##### native\n\n- Endpoint: https://rpc-mumbai.maticvigil.com\n- Contract address: 0x6003028E5C3FB11c5F002902dDa1E18cF6a5D34B\n\n##### ERC20\n\n- Endpoint: https://rpc-mumbai.maticvigil.com\n- Contract address: 0xa66ffa7b45d9138e6A93bBa1f29a580bd559E5cC\n\n##### ERC721\n\n- Endpoint: https://rpc-mumbai.maticvigil.com\n- Contract address: 0x6003028E5C3FB11c5F002902dDa1E18cF6a5D34B\n\n<br>\n\n## Introduction\n\nInstall the necessary libraries\n\n**npm**\n\n```\nnpm install --save web3 @atomic-port/evm\n```\n\n**yarn**\n\n```\nyarn add web3 @atomic-port/evm\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[native/lock.ts](../../examples/evm/src/native/lock.ts)<br>\n[erc20/lock.ts](../../examples/evm/src/erc20/lock.ts)<br>\n[erc721/lock.ts](../../examples/evm/src/erc721/lock.ts)<br>\n[erc20JPYC/lock.ts](../../examples/evm/src/erc20JPYC/lock.ts)<br>\n[erc20Polygon/lock.ts](../../examples/evm/src/erc20Polygon/lock.ts)<br>\n\n<br>\n\n## Unlocking by Proof\n\nWith a secret lock, locked assets are withdrawn through a secret proof transaction.\n\n[native/withDraw.ts](../../examples/evm/src/native/withDraw.ts)<br>\n[erc20/withDraw.ts](../../examples/evm/src/erc20/withDraw.ts)<br>\n[erc721/withDraw.ts](../../examples/evm/src/erc721/withDraw.ts)<br>\n[erc20JPYC/withDraw.ts](../../examples/evm/src/erc20JPYC/withDraw.ts)<br>\n[erc20Polygon/lock.ts](../../examples/evm/src/erc20Polygon/withDraw.ts)<br>\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 ethereum](https://ethereum.org/)\n","readmeFilename":"README.md"}