{"_id":"@bitfixyz/market-maker-sdk","_rev":"15-9319def69eda74a97493ace1b6412035","name":"@bitfixyz/market-maker-sdk","dist-tags":{"latest":"0.1.7"},"versions":{"0.0.1":{"name":"@bitfixyz/market-maker-sdk","version":"0.0.1","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.0.1","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"ac69394d468bd044aef8f94d02fe022becc16fc5","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.0.1.tgz","fileCount":92,"integrity":"sha512-dZ7KpQ6NCroyxj5cGxbEGn65Z/x7ylCJDPvkPLhqvlYDyRUsqd7zEvlwQV1LAZdYr2Mc76ovzmx4T2vLJR/JwA==","signatures":[{"sig":"MEUCIQCUf2KlU8F7LCvmU/fAjTVKfyv2UwBxmBnmPZHTg/OnKwIgAr6g6vAqVbXAnDjfeNhkS1x/oy+pQ7x+SbedSJ/E3c4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":534865},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"cf06249b67e6608d9bcf57a482126479e80abfc3","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.0.1_1733976358171_0.2772399589463037","host":"s3://npm-registry-packages-npm-production"}},"0.0.2":{"name":"@bitfixyz/market-maker-sdk","version":"0.0.2","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.0.2","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"35737a1bacecf60d2d666648ff82233d6fd0b94a","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.0.2.tgz","fileCount":56,"integrity":"sha512-16ejyLETPYbANK7fSgBgjVtF9EaRZu/4C4HW2pFmr7rycknwEYfdmasfKwSY0fimOI+SqrW02bSpql+9etdKEg==","signatures":[{"sig":"MEQCIDHGk+x7zdwE/zlcqa3v4gjWBjjdkWOcIXrbDkrPbyedAiBthF1Ve07XZ6DDpSxmSF/QMOsG5ZmeeIB+oX07NqTZjQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":280550},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"14a293ffb94902f7737f353082f023f7018f2855","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.0.2_1734584975506_0.9917491271765362","host":"s3://npm-registry-packages-npm-production"}},"0.0.3":{"name":"@bitfixyz/market-maker-sdk","version":"0.0.3","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.0.3","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"13ad022bd77ec9a5ab2cdeeca74f97928dd1a465","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.0.3.tgz","fileCount":56,"integrity":"sha512-gGH7ogWt2cuw8w/Q7s8CoT4wAaMaswaIQixdYeBtA2TobdBxAzjSE07DwG9r8QE2RN3cKtrMZ2sjZaq+niid1Q==","signatures":[{"sig":"MEQCIAq9f2KwN8BksHmcLttg03VRgqwVLz6mENZI++lPQe6iAiAtI746kC/rlF2EYQmYatxRLE8VsjDxSIk3nplvbF+kFA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":280779},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"909a405e0311ad992aafd1ffb10417f9f34e55cd","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.0.3_1734927418458_0.31015714074557144","host":"s3://npm-registry-packages-npm-production"}},"0.0.4":{"name":"@bitfixyz/market-maker-sdk","version":"0.0.4","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.0.4","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"40e6da19f640075f5ca92f9151d0bf0e2be1f790","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.0.4.tgz","fileCount":56,"integrity":"sha512-4kZknxdWl1klXAkGMC8PYzCfCbk4pd4qfEkZzmyF/NpsmLHyYEuc1bAI47q0DMCYZcMrn3zZWAvOjC3R5t972w==","signatures":[{"sig":"MEUCIQCb6moWTgz1X20fJhJCSBuRNNl9IP4vg4pQ/XWdhfKuJgIgTB6OGnRTN46ecHmvj1eRIOvGTGx+qUYw7ETKqYbDa5c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":280780},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"c823ad541951b6b27c0cc80b2656c1bed8c024dc","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.0.4_1735615198727_0.4093596602118257","host":"s3://npm-registry-packages-npm-production"}},"0.0.5":{"name":"@bitfixyz/market-maker-sdk","version":"0.0.5","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.0.5","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"2aaefc6b08e39938a1bf1bbc8ad3752e96285d8d","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.0.5.tgz","fileCount":62,"integrity":"sha512-nUwuRk7beVrjCSsjzJjW4SDnIU9aM3jztSVD0uoCnCj15oQFh+NxttH3WM1OZVI1Dg7BQno+XWfs8IVBbWpGZw==","signatures":[{"sig":"MEUCICpJhoHzYb1xgRbQ7LHsmc5ygn0ENpnsLg7yEGf7lm54AiEAkc6aSK3i4os8WBz5wNCcLqCvQiE/f802yWAmehzaTAs=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304611},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"58953bf8dc0b75e8eed09e6b7455d8c9c93df9ca","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.0.5_1735619150952_0.05589741321141939","host":"s3://npm-registry-packages-npm-production"}},"0.0.6":{"name":"@bitfixyz/market-maker-sdk","version":"0.0.6","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.0.6","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"2fbdd10d435dc94ae05e41b4fa51584eb8c61cba","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.0.6.tgz","fileCount":62,"integrity":"sha512-1/YMJcMH1D3+xxPDBMLPl0chtAF3gGmfKizSqYeONyiGczUGssUxXi51dgQNdk5eMSBQTJGzm6KhafEtnAsJ9g==","signatures":[{"sig":"MEYCIQD4ysQ1EV0ILQjdNZHgBYs2AUMbGaUoYJwNtJheenUKyAIhAMKq19/ikjN5fVcXDhVeSExO91A8dPp1cDkeCwg168LO","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":304696},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"d846c74b19b3c8ad4731941d79684244f0a77858","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.0.6_1735643663670_0.3545892801846593","host":"s3://npm-registry-packages-npm-production"}},"0.0.7":{"name":"@bitfixyz/market-maker-sdk","version":"0.0.7","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.0.7","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"728160a60679cbad7ef45f32bd81d1858bc7d25c","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.0.7.tgz","fileCount":62,"integrity":"sha512-uL7UdKbUYCAcckSXlAxCSoIylFy7Amd/i8brUhYZbPpRD0TodOKqkzpxFsLWYnxTeyQYHal+xbEoRNDMQmW+gw==","signatures":[{"sig":"MEUCIQDvo3TFKO4xxXOH2tSx2anYrPjmrc8jnRpYhVnAL9PpfwIgaVGlKkOH0RT18zkVfxbxeYUOF5VLmPVE+lHxfPdrI14=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305288},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"d846c74b19b3c8ad4731941d79684244f0a77858","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.0.7_1735649113019_0.9650476795098337","host":"s3://npm-registry-packages-npm-production"}},"0.0.8":{"name":"@bitfixyz/market-maker-sdk","version":"0.0.8","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.0.8","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"5cb6b277d45ff69aeccfb7b69ee099e0c5da25a9","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.0.8.tgz","fileCount":62,"integrity":"sha512-ZIGkZzGjPtVQ8/kXfZOSZl0j2zEVABNvl+tax7S/OwnEhzRh8IOpF8JZ6fyQ4TcrN1sEs2yJF3zlgz4rxE7KGw==","signatures":[{"sig":"MEYCIQC1COqx/2rBJ5rW/ESJjJOFsztpCsRZBO/V/FoqATt72wIhAJm8d/U/sTAEkazcp0X6bLn6Dwn8ri2n4/nRt9TdCWDJ","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305577},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"4e33225d3e549d544611da64268703272498acc3","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.0.8_1735807841404_0.4047235225902408","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@bitfixyz/market-maker-sdk","version":"0.1.0","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.1.0","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"c3aba92a6e4130527c3b75a824194d64c246aef8","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.1.0.tgz","fileCount":62,"integrity":"sha512-VzgZ2IkPxDUp8HWRfTg5vKWq3weAsI+R7zddb7nceghCSbIS/p6BdwWNaqkr0M4uITRRRNOcikTlYfqGamwSmA==","signatures":[{"sig":"MEUCIG9op5VNRB8hSFRxaXJMQfoE4OWRx5zLngBHG9ykcU19AiEA8wWY4MlAFXoOoW6gH3wqOD6a740Aoj5oL4wMH8tWjII=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305492},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"240fd6a8b43beb305a5cf950c42858c396706211","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.1.0_1736238062382_0.879107146167615","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bitfixyz/market-maker-sdk","version":"0.1.1","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.1.1","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"d5ad132aa4d2603c0df3e5c73ef8dcdb3ee8bcb3","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.1.1.tgz","fileCount":62,"integrity":"sha512-NASN79hYcC6ntE0J0nngBwExc7najTxx6ay2dhGSLCyho2IPDkTNsCn7mKs007JiXRDlHnnKenckd2sYDDyb1w==","signatures":[{"sig":"MEYCIQDUuNMK7oUqa1RwWi3ttFkf/w6henq/Yq+cWGSpc4FbZwIhAJo2nO269U7vx5FNefiB0VJ9+H+NWiuckQTL1C734iaH","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":306452},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"58560bf05ba50b69f45e87637319311ed37ccf65","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.1.1_1736246588309_0.7503035319572138","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@bitfixyz/market-maker-sdk","version":"0.1.2","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.1.2","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"2b422f100ca345f2e2f4e345b8cbf503a2bec09e","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.1.2.tgz","fileCount":62,"integrity":"sha512-5Lc4kDD8ho1+VYOLS8EHAKAwwL7Std+t6XEre6lRWUJ0ACoOUx7d7wgUWiQmlUKmAjf6MYK/zTZrIV3WsDm9Cw==","signatures":[{"sig":"MEUCIBETxOPoemAybFkoSD+Th4HIfjdX42TGHwkX/upr11aeAiEA4c4YI+m/fELLo4be7dYZv8M40R9x6uC7/i4KKadLs4w=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":306188},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"58560bf05ba50b69f45e87637319311ed37ccf65","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.1.2_1736259360526_0.6090709493387922","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@bitfixyz/market-maker-sdk","version":"0.1.3","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.1.3","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"c7ba932120e1688b2077dbe2a0735caadd7c431b","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.1.3.tgz","fileCount":62,"integrity":"sha512-+sFNahJ7PDTc0xiIQcNnuCuuqgZB+sgG1MS1kjXUTXYSNAOuYAnSELs5pOTcpi8h2/E1feHBeWMCuLwPXZRlpA==","signatures":[{"sig":"MEUCIQCGu3sgIIX0Av8aJerVRtEuiT80MdK8jbFjGNJ+Wrns3wIgSQxa5q5PVmT4AB3lsXUN9kYPaLfhKKMzaP2BhWuhTe4=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305729},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"58560bf05ba50b69f45e87637319311ed37ccf65","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.1.3_1736260484794_0.12296870033013207","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@bitfixyz/market-maker-sdk","version":"0.1.4","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.1.4","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"26ddaf1419873fcbf8a177cdbbd19e318ea50bc8","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.1.4.tgz","fileCount":62,"integrity":"sha512-+JqYwHdtB5A3PkpvmBXW5aUkD1vmKrDEENtNpx8z3PUzgODVZhA1quLxOoLA5YydMuFx8nT8eP1PONyav9RbLA==","signatures":[{"sig":"MEUCIQCwTdgVTO7wlJa3xrQ2Q2YFfspuB2ksIPGOGRs96FshIgIgGL/4EUCipn/kLVE+cBtlihQNlW9aLCWtaZTJ1G6F1Aw=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305721},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"58560bf05ba50b69f45e87637319311ed37ccf65","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.1.4_1736261366495_0.9516665444141432","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@bitfixyz/market-maker-sdk","version":"0.1.5","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.1.5","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"779d4e8adf0ac6e3ce14b529626c3e6a9347e5da","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.1.5.tgz","fileCount":62,"integrity":"sha512-ePwjPIF4yUi/M59yx/dWegHZWJ2+5w3HEw9Lad3rj8AE2zD3jIjAkMoxS5RZuC+5qDgbPOPWwBRz8uNXKmaRNA==","signatures":[{"sig":"MEYCIQDezvfWhuaUGyW7Z3Kbs84AU3gls5/jnA8v5i5d61IdpgIhAJQDUj4q1dDCXWl90IgEAOU8rm7JIJ4vJ3Ge4YZLuAPv","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305741},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1d31221bd091a9daad0caece3e9691577aecf498","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.1.5_1737362460844_0.4198893972449558","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@bitfixyz/market-maker-sdk","version":"0.1.6","keywords":["bitfi","maker","market","sdk"],"license":"MIT","_id":"@bitfixyz/market-maker-sdk@0.1.6","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"homepage":"https://github.com/bitfixyz/bitfi-market-maker-sdk#readme","bugs":{"url":"https://github.com/bitfixyz/bitfi-market-maker-sdk/issues"},"dist":{"shasum":"4820af6e8a00c958f278ac8d39d8b712099a794b","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.1.6.tgz","fileCount":62,"integrity":"sha512-mCUQgLfrPCmbVBHAe+ku1ey9jFx6tyclum9e28BpFBqTI76jIppv7aW839Rv6wYsyLjiYQissD4/NnxNimvGbA==","signatures":[{"sig":"MEYCIQDC7RxydpOhbnFx8cYdZVRi9mmfOpgHoDgbSDAAMnzcHAIhANC87lqhYLI2Qt4BAivR7ochkrMNS63cgkWNv974PsMp","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":305766},"main":"dist/index.js","types":"dist/index.d.ts","gitHead":"1d31221bd091a9daad0caece3e9691577aecf498","private":false,"scripts":{"ctix":"node generate-indexes.js","build":"tsc","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract"},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"repository":{"url":"git+https://github.com/bitfixyz/bitfi-market-maker-sdk.git","type":"git"},"_npmVersion":"10.8.1","description":"## Overview BitFi Market Maker SDK is a TypeScript library that provides a comprehensive interface for interacting with the BitFi decentralized trading platform. The SDK facilitates cross-chain token transfers, signature verification, and trade settlement","directories":{},"_nodeVersion":"22.3.0","dependencies":{"zod":"^3.23.8","axios":"^1.7.9","bip174":"^3.0.0-rc.1","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","bitcoinjs-lib":"^7.0.0-rc.0","tiny-secp256k1":"^2.2.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typechain":"^8.3.2","typescript":"^5.7.2","@types/node":"^22.10.1","@typechain/ethers-v6":"^0.5.1"},"_npmOperationalInternal":{"tmp":"tmp/market-maker-sdk_0.1.6_1737378626024_0.979845776417628","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@bitfixyz/market-maker-sdk","version":"0.1.7","private":false,"publishConfig":{"access":"public"},"main":"dist/index.js","module":"dist/index.mjs","types":"dist/index.d.ts","repository":{"type":"git","url":"git+https://github.com/bitfixyz/petafi-market-maker-sdk.git"},"homepage":"https://github.com/bitfixyz/petafi-market-maker-sdk#readme","keywords":["PetaFi","maker","market","sdk"],"license":"MIT","scripts":{"build":"tsup","typechain":"typechain --target=ethers-v6 ./abi/**/**.json --out-dir ./src/contracts/contract","ctix":"node generate-indexes.js"},"dependencies":{"axios":"^1.7.9","bip174":"^3.0.0-rc.1","bitcoinjs-lib":"^7.0.0-rc.0","ecpair":"^3.0.0-rc.0","ethers":"^6.13.4","tiny-secp256k1":"^2.2.3","zod":"^3.23.8"},"devDependencies":{"@typechain/ethers-v6":"^0.5.1","@types/node":"^22.10.1","tsup":"^8.4.0","typechain":"^8.3.2","typescript":"^5.7.3"},"_id":"@bitfixyz/market-maker-sdk@0.1.7","gitHead":"6634ad0c226663e7b34344c77c87b89e8ff077f8","description":"A comprehensive toolkit for implementing Private Market Makers (PMMs) in the PetaFi cross-chain trading network. This guide covers the required integration points between PMMs and our solver backend, enabling cross-chain liquidity provision and settlement","bugs":{"url":"https://github.com/bitfixyz/petafi-market-maker-sdk/issues"},"_nodeVersion":"22.3.0","_npmVersion":"10.8.1","dist":{"integrity":"sha512-BygvcTQMNufIow3JnF99E3XYyQ5VYRJ5EPLK7wVZu9Zjs/ps2sP+Qz1CRpWfZX0DdkD+BtpLKU+0PY9reau7dg==","shasum":"1b93f8b815c536a9c14975fd68dc5031549542c8","tarball":"https://registry.npmjs.org/@bitfixyz/market-maker-sdk/-/market-maker-sdk-0.1.7.tgz","fileCount":6,"unpackedSize":581799,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCHxZrH4GqPawsp2t4NN7EfBGMlROhxj20FjYBqILHs/UCIQDObrdhX77XOTA0p9UeiqgGCIpgWmgzd/0SA2/lqwg64A=="}]},"_npmUser":{"name":"phathdt","email":"phathdt379@gmail.com"},"directories":{},"maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/market-maker-sdk_0.1.7_1740987756417_0.03372415125134731"},"_hasShrinkwrap":false}},"time":{"created":"2024-12-12T04:05:58.044Z","modified":"2025-03-03T07:42:36.777Z","0.0.1":"2024-12-12T04:05:58.340Z","0.0.2":"2024-12-19T05:09:35.720Z","0.0.3":"2024-12-23T04:16:58.646Z","0.0.4":"2024-12-31T03:19:58.926Z","0.0.5":"2024-12-31T04:25:51.124Z","0.0.6":"2024-12-31T11:14:23.989Z","0.0.7":"2024-12-31T12:45:13.304Z","0.0.8":"2025-01-02T08:50:41.597Z","0.1.0":"2025-01-07T08:21:02.551Z","0.1.1":"2025-01-07T10:43:08.490Z","0.1.2":"2025-01-07T14:16:00.777Z","0.1.3":"2025-01-07T14:34:45.022Z","0.1.4":"2025-01-07T14:49:26.656Z","0.1.5":"2025-01-20T08:41:01.038Z","0.1.6":"2025-01-20T13:10:26.371Z","0.1.7":"2025-03-03T07:42:36.599Z"},"bugs":{"url":"https://github.com/bitfixyz/petafi-market-maker-sdk/issues"},"license":"MIT","homepage":"https://github.com/bitfixyz/petafi-market-maker-sdk#readme","keywords":["PetaFi","maker","market","sdk"],"repository":{"type":"git","url":"git+https://github.com/bitfixyz/petafi-market-maker-sdk.git"},"description":"A comprehensive toolkit for implementing Private Market Makers (PMMs) in the PetaFi cross-chain trading network. This guide covers the required integration points between PMMs and our solver backend, enabling cross-chain liquidity provision and settlement","maintainers":[{"name":"phathdt","email":"phathdt379@gmail.com"}],"readme":"# PMM SDK Integration Documentation\n\nA comprehensive toolkit for implementing Private Market Makers (PMMs) in the PetaFi cross-chain trading network. This guide covers the required integration points between PMMs and our solver backend, enabling cross-chain liquidity provision and settlement.\n\n## Overview\n\nThis repository contains everything needed to integrate your PMM with PetaFi's solver network:\n\n```mermaid\n\nsequenceDiagram\n    participant User\n    participant Solver\n    participant PMM\n    participant Chain\n\n    Note over User,Chain: Phase 1: Indicative Quote\n    User->>Solver: Request quote\n    Solver->>PMM: GET /indicative-quote\n    PMM-->>Solver: Return indicative quote\n    Solver-->>User: Show quote\n\n    Note over User,Chain: Phase 2: Commitment\n    User->>Solver: Accept quote\n    Solver->>PMM: GET /commitment-quote\n    PMM-->>Solver: Return commitment quote\n\n    Note over User,Chain: Phase 3: Settlement\n    Solver->>PMM: GET /settlement-signature\n    PMM-->>Solver: Return signature\n    Solver->>PMM: POST /ack-settlement\n    PMM-->>Solver: Acknowledge settlement\n    Solver->>PMM: POST /signal-payment\n    PMM-->>Solver: Acknowledge signal\n    PMM->>Chain: Execute settlement (transfer)\n    PMM->>Solver: POST /submit-settlement-tx\n    Solver-->>PMM: Confirm settlement submission\n```\n\n### Repository Structure\nThe repository consists of:\n- `abi/`: Smart contract ABIs and interfaces\n- `example/`: A complete mock PMM implementation showing how to integrate the SDK\n- `src/`: Source code for the market maker SDK\n\n### Example Implementation\nThe [Example](example/) directory contains a fully functional mock PMM. Use this implementation as a reference while integrating the `@petafixyz/market-maker-sdk` into your own PMM service.\n\n## Quick Start\n\n```bash\nnpm install @petafixyz/market-maker-sdk\n# or\nyarn add @petafixyz/market-maker-sdk\n```\n### Env\n| Variable | Development | Production |\n| -------- | ----------- | ---------- |\n| SDK_ENV  | dev         | production |\n\n## Solver Functions for PMMs\n\nSDK functions for PMM-Solver communication. See PMM Services for full documentation [PMM Services](pmm_sdk_services.md)\n\n### 1. Function getTokens\n\n#### Description\n\nReturns a list of all supported tokens across different networks.\n\n#### Example code\n\n```ts\nimport { tokenService } from '@petafixyz/market-maker-sdk'\n\ntokenService.getTokens()\n\n```\n\n---\n### 2. Function submitSettlementTx\n\n#### Description\n\nAllows the PMM to submit the settlement transaction hash for one or more trades. This step is necessary to complete the trade settlement process.\n\n- `trade_ids` (array of strings): An array of trade IDs associated with the settlement transaction.\n- `pmm_id` (string): The PMM's ID, which must match the one committed for the trade(s).\n- `settlement_tx` (string): The raw transaction data (in hex) representing the settlement.\n- `signature` (string): The PMM's signature on the settlement transaction.\n- `start_index` (integer): The index indicating the starting point for settlement processing (used for batch settlements).\n- `signed_at` (integer): The UNIX timestamp (in seconds) when the PMM signed the settlement transaction.\n\n#### Example\n\n```ts\nimport {\n  getMakePaymentHash,\n  getSignature,\n  routerService,\n  SignatureType,\n  signerService,\n  solverService,\n} from '@petafixyz/market-maker-sdk'\n\nasync submit(job: Job<string>) {\n  const { tradeId, paymentTxId } = toObject(job.data) as SubmitSettlementEvent\n\n  try {\n    const tradeIds: BytesLike[] = [tradeId]\n    const startIdx = BigInt(tradeIds.indexOf(tradeId))\n\n    const signerAddress = await this.routerService.getSigner()\n\n    const signedAt = Math.floor(Date.now() / 1000)\n\n    const makePaymentInfoHash = getMakePaymentHash(tradeIds, BigInt(signedAt), startIdx, ensureHexPrefix(paymentTxId))\n\n    const domain = await signerService.getDomain()\n\n    const signature = await getSignature(\n      this.pmmWallet,\n      this.provider,\n      signerAddress,\n      tradeId,\n      makePaymentInfoHash,\n      SignatureType.MakePayment,\n      domain\n    )\n\n    const pmmId = ... // string\n    const requestPayload = {\n      tradeIds: [tradeId],\n      pmmId: pmmId,\n      settlementTx: ensureHexPrefix(paymentTxId),\n      signature: signature,\n      startIndex: 0,\n      signedAt: signedAt,\n    }\n\n\n    const response = await this.solverSerivce.submitSettlementTx(requestPayload)\n\n    return response\n  } catch (error: any) {\n    this.logger.error('submit settlement error', error.stack)\n\n    throw error // Re-throw the error for the queue to handle\n  }\n}\n```\n#### Notes\n\n- **Trade IDs**: Provide all trade IDs included in the settlement transaction.\n- **Start Index**: Used when submitting a batch of settlements to indicate the position within the batch.\n- **Signature**: Must be valid and verifiable by the solver backend.\n\n---\n\n\n## PMM Backend APIs\n\nAPIs that PMMs must implement for Solver integration. These endpoints allow Solvers to communicate with your PMM service.\n\n### 1. Endpoint: `/indicative-quote`\n\n#### Description\n\nProvides an indicative quote for the given token pair and trade amount. The quote is used for informational purposes before a commitment is made.\n\n#### Request Parameters\n\n- **HTTP Method**: `GET`\n- **Query Parameters**:\n  - `from_token_id` (string): The ID of the source token.\n  - `to_token_id` (string): The ID of the destination token.\n  - `amount` (string): The amount of the source token to be traded, represented as a string in base 10 to accommodate large numbers.\n  - `session_id` (string, optional): A unique identifier for the session.\n\n#### Example Request\n\n```\nGET /indicative-quote?from_token_id=ETH&to_token_id=BTC&amount=1000000000000000000&session_id=12345\n```\n\n#### Expected Response\n\n- **HTTP Status**: `200 OK`\n- **Response Body** (JSON):\n\n```json\n{\n  \"session_id\": \"12345\",\n  \"pmm_receiving_address\": \"0xReceivingAddress\",\n  \"indicative_quote\": \"123456789000000000\",\n  \"error\": \"\" // Empty if no error\n}\n```\n\n- `session_id` (string): The session ID associated with the request.\n- `pmm_receiving_address` (string): The receiving address where the user will send the `from_token`.\n- `indicative_quote` (string): The indicative quote value, represented as a string.\n- `error` (string): Error message, if any (empty if no error).\n\n#### Example code\n\n```js\nimport { Token, tokenService } from '@petafixyz/market-maker-sdk'\n\nexport const IndicativeQuoteResponseSchema = z.object({\n  sessionId: z.string(),\n  pmmReceivingAddress: z.string(),\n  indicativeQuote: z.string(),\n  error: z.string().optional(),\n});\n\nexport type IndicativeQuoteResponse = z.infer<\n  typeof IndicativeQuoteResponseSchema\n>;\n\nasync getIndicativeQuote(dto: GetIndicativeQuoteDto): Promise<IndicativeQuoteResponse> {\n  const sessionId = dto.sessionId || this.generateSessionId()\n\n  const [fromToken, toToken] = Promise.all([\n    this.tokenService.getTokenByTokenId(dto.fromTokenId),\n    this.tokenService.getTokenByTokenId(dto.toTokenId),\n  ])\n\n  const quote = this.calculateBestQuote()\n\n  return {\n    sessionId,\n    pmmReceivingAddress,\n    indicativeQuote: quote,\n    error: '',\n  }\n}\n\n```\n---\n\n### 2. Endpoint: `/commitment-quote`\n\n#### Description\n\nProvides a commitment quote for a specific trade, representing a firm commitment to proceed under the quoted conditions.\n\n#### Request Parameters\n\n- **HTTP Method**: `GET`\n- **Query Parameters**:\n  - `session_id` (string): A unique identifier for the session.\n  - `trade_id` (string): The unique identifier for the trade.\n  - `from_token_id` (string): The ID of the source token.\n  - `to_token_id` (string): The ID of the destination token.\n  - `amount` (string): The amount of the source token to be traded, in base 10.\n  - `from_user_address` (string): The address of the user initiating the trade.\n  - `to_user_address` (string): The address where the user will receive the `to_token`.\n  - `user_deposit_tx` (string): The transaction hash where the user deposited their funds.\n  - `user_deposit_vault` (string): The vault where the user's deposit is kept.\n  - `trade_deadline` (string): The UNIX timestamp (in seconds) by which the user expects to receive payment.\n  - `script_deadline` (string): The UNIX timestamp (in seconds) after which the user can withdraw their deposit if not paid.\n\n#### Example Request\n\n```\nGET /commitment-quote?session_id=12345&trade_id=abcd1234&from_token_id=ETH&to_token_id=BTC&amount=1000000000000000000&from_user_address=0xUserAddress&to_user_address=0xReceivingAddress&user_deposit_tx=0xDepositTxHash&user_deposit_vault=VaultData&trade_deadline=1696012800&script_deadline=1696016400\n```\n\n#### Expected Response\n\n- **HTTP Status**: `200 OK`\n- **Response Body** (JSON):\n\n```json\n{\n  \"trade_id\": \"abcd1234\",\n  \"commitment_quote\": \"987654321000000000\",\n  \"error\": \"\" // Empty if no error\n}\n```\n\n  - `trade_id` (string): The trade ID associated with the request.\n  - `commitment_quote` (string): The committed quote value, represented as a string.\n  - `error` (string): Error message, if any (empty if no error).\n\n#### Example\n\n```js\nimport { Token, tokenService } from '@petafixyz/market-maker-sdk'\n\nexport const GetCommitmentQuoteSchema = z.object({\n  sessionId: z.string(),\n  tradeId: z.string(),\n  fromTokenId: z.string(),\n  toTokenId: z.string(),\n  amount: z.string(),\n  fromUserAddress: z.string(),\n  toUserAddress: z.string(),\n  userDepositTx: z.string(),\n  userDepositVault: z.string(),\n  tradeDeadline: z.string(),\n  scriptDeadline: z.string(),\n});\n\nexport class GetCommitmentQuoteDto extends createZodDto(\n  GetCommitmentQuoteSchema\n) {}\n\nasync getCommitmentQuote(dto: GetCommitmentQuoteDto): Promise<CommitmentQuoteResponse> {\n  const session = await this.sessionRepo.findById(dto.sessionId)\n\n  const [fromToken, toToken] = await Promise.all([\n    tokenService.getTokenByTokenId(dto.fromTokenId),\n    tokenService.getTokenByTokenId(dto.toTokenId),\n  ])\n\n  const quote = this.calculateBestQuote(...)\n\n  await this.tradeService.createTrade({ tradeId: dto.tradeId })\n\n  await this.tradeService.updateTradeQuote(dto.tradeId, { commitmentQuote: quote })\n\n  return {\n    tradeId: dto.tradeId,\n    commitmentQuote: quote,\n    error: '',\n  }\n}\n\n```\n---\n\n### 3. Endpoint: `/settlement-signature`\n\n#### Description\n\nReturns a signature from the PMM to confirm the settlement quote, required to finalize the trade.\n\n#### Request Parameters\n\n- **HTTP Method**: `GET`\n- **Query Parameters**:\n  - `trade_id` (string): The unique identifier for the trade.\n  - `committed_quote` (string): The committed quote value in base 10.\n  - `solver_fee` (string): The fee amount for the solver in base 10.\n  - `trade_deadline` (string): The UNIX timestamp (in seconds) by which the user expects to receive payment.\n  - `script_deadline` (string): The UNIX timestamp (in seconds) after which the user can withdraw their deposit if not paid.\n\n#### Example Request\n\n```\nGET /settlement-signature?trade_id=abcd1234&committed_quote=987654321000000000&solver_fee=5000000000000000&trade_deadline=1696012800&script_deadline=1696016400\n```\n\n#### Expected Response\n\n- **HTTP Status**: `200 OK`\n- **Response Body** (JSON):\n\n```json\n{\n  \"trade_id\": \"abcd1234\",\n  \"signature\": \"0xSignatureData\",\n  \"deadline\": 1696012800,\n  \"error\": \"\" // Empty if no error\n}\n```\n\n  - `trade_id` (string): The trade ID associated with the request.\n  - `signature` (string): The signature provided by the PMM.\n  - `deadline` (integer): The UNIX timestamp (in seconds) indicating the PMM's expected payment deadline.\n  - `error` (string): Error message, if any (empty if no error).\n\n#### Example\n\n```ts\nimport {\n  getCommitInfoHash,\n  getSignature,\n  routerService,\n  SignatureType,\n  signerService,\n} from '@petafixyz/market-maker-sdk'\n\nexport const GetSettlementSignatureSchema = z.object({\n  tradeId: z.string(),\n  committedQuote: z.string(),\n  solverFee: z.string(),\n  tradeDeadline: z.string(),\n  scriptDeadline: z.string(),\n})\n\nexport class GetSettlementSignatureDto extends createZodDto(GetSettlementSignatureSchema) {}\n\nasync getSettlementSignature(dto: GetSettlementSignatureDto, trade: Trade): Promise<SettlementSignatureResponseDto> {\n  try {\n    const { tradeId } = trade\n\n    // Get data directly from l2 contract or using routerService ( wrapper of l2 contract )\n    const [presigns, tradeData] = await Promise.all([\n      routerService.getPresigns(tradeId),\n      routerService.getTradeData(tradeId),\n    ])\n\n    const { toChain } = tradeData.tradeInfo\n    const deadline = BigInt(Math.floor(Date.now() / 1000) + 1800)\n\n    const pmmId = ... // hexString\n    const pmmPresign = presigns.find((t) => t.pmmId === pmmId)\n    if (!pmmPresign) {\n      throw new BadRequestException('pmmPresign not found')\n    }\n\n    // calculate amountOut\n    const amountOut = BigInt(dto.committedQuote) - BigInt(dto.solverFee)\n\n    const commitInfoHash = getCommitInfoHash(\n      pmmPresign.pmmId,\n      pmmPresign.pmmRecvAddress,\n      toChain[1],\n      toChain[2],\n      amountOut,\n      deadline\n    )\n\n    const signerAddress = await this.routerService.getSigner()\n\n    const domain = await signerService.getDomain()\n\n    const signature = await getSignature(\n      this.pmmWallet,\n      this.provider,\n      signerAddress,\n      tradeId,\n      commitInfoHash,\n      SignatureType.VerifyingContract,\n      domain\n    )\n\n    return {\n      tradeId: tradeId,\n      signature,\n      deadline: Number(deadline),\n      error: '',\n    }\n  } catch (error: any) {\n\n  }\n}\n```\n---\n\n### 4. Endpoint: `/ack-settlement`\n\n#### Description\n\nUsed by the solver to acknowledge to the PMM about a successful settlement, indicating whether the PMM is selected.\n\n#### Request Parameters\n\n- **HTTP Method**: `POST`\n- **Form Parameters**:\n  - `trade_id` (string): The unique identifier for the trade.\n  - `trade_deadline` (string): The UNIX timestamp (in seconds) by which the user expects to receive payment.\n  - `script_deadline` (string): The UNIX timestamp (in seconds) after which the user can withdraw their deposit if not paid.\n  - `chosen` (string): `\"true\"` if the PMM is selected, `\"false\"` otherwise.\n\n#### Example Request\n\n```\nPOST /ack-settlement\nContent-Type: application/x-www-form-urlencoded\n\ntrade_id=abcd1234&trade_deadline=1696012800&script_deadline=1696016400&chosen=true\n```\n\n#### Expected Response\n\n- **HTTP Status**: `200 OK`\n- **Response Body** (JSON):\n\n```json\n{\n  \"trade_id\": \"abcd1234\",\n  \"status\": \"acknowledged\",\n  \"error\": \"\" // Empty if no error\n}\n```\n\n- `trade_id` (string): The trade ID associated with the request.\n- `status` (string): Status of the acknowledgment (always `\"acknowledged\"`).\n- `error` (string): Error message, if any (empty if no error).\n\n#### Example\n\n```ts\nexport const AckSettlementSchema = z.object({\n  tradeId: z.string(),\n  tradeDeadline: z.string(),\n  scriptDeadline: z.string(),\n  chosen: z.string().refine((val) => val === 'true' || val === 'false', {\n    message: \"chosen must be 'true' or 'false'\",\n  }),\n})\n\nexport class AckSettlementDto extends createZodDto(AckSettlementSchema) {}\n\nasync ackSettlement(dto: AckSettlementDto, trade: Trade): Promise<AckSettlementResponseDto> {\n  try {\n    return {\n      tradeId: dto.tradeId,\n      status: 'acknowledged',\n      error: '',\n    }\n  } catch (error: any) {\n    if (error instanceof HttpException) {\n      throw error\n    }\n    throw new BadRequestException(error.message)\n  }\n}\n```\n---\n\n### 5. Endpoint: `/signal-payment`\n\n#### Description\n\nUsed by the solver to signal the chosen PMM to start submitting their payment.\n\n#### Request Parameters\n\n- **HTTP Method**: `POST`\n- **Form Parameters**:\n  - `trade_id` (string): The unique identifier for the trade.\n  - `protocol_fee_amount` (string): The amount of protocol fee the PMM has to submit, in base 10.\n  - `trade_deadline` (string): The UNIX timestamp (in seconds) by which the user expects to receive payment.\n  - `script_deadline` (string): The UNIX timestamp (in seconds) after which the user can withdraw their deposit if not paid.\n\n#### Example Request\n\n```\nPOST /signal-payment\nContent-Type: application/x-www-form-urlencoded\n\ntrade_id=abcd1234&protocol_fee_amount=1000000000000000&trade_deadline=1696012800&script_deadline=1696016400\n```\n\n#### Expected Response\n\n- **HTTP Status**: `200 OK`\n- **Response Body** (JSON):\n\n```json\n{\n  \"trade_id\": \"abcd1234\",\n  \"status\": \"acknowledged\",\n  \"error\": \"\" // Empty if no error\n}\n```\n\n- `trade_id` (string): The trade ID associated with the request.\n- `status` (string): Status of the acknowledgment (always `\"acknowledged\"`).\n- `error` (string): Error message, if any (empty if no error).\n\n#### Example\n\n```ts\nexport const SignalPaymentSchema = z.object({\n  tradeId: z.string(),\n  protocolFeeAmount: z.string(),\n  tradeDeadline: z.string(),\n  scriptDeadline: z.string(),\n})\n\nexport class SignalPaymentDto extends createZodDto(SignalPaymentSchema) {}\n\nasync signalPayment(dto: SignalPaymentDto, trade: Trade): Promise<SignalPaymentResponseDto> {\n  try {\n    // enqueue tranfer with dto and trade\n\n    return {\n      tradeId: dto.tradeId,\n      status: 'acknowledged',\n      error: '',\n    }\n  } catch (error: any) {\n    if (error instanceof HttpException) {\n      throw error\n    }\n    throw new BadRequestException(error.message)\n  }\n}\n```\n---\n\n## PMM making payment\n\n```ts\nimport { Token } from '@petafixyz/market-maker-sdk'\n\nexport interface TransferParams {\n  toAddress: string\n  amount: bigint\n  token: Token\n  tradeId: string\n}\n\nexport interface ITransferStrategy {\n  transfer(params: TransferParams): Promise<string>\n}\n```\n\n### EVM\nIncase toChain is EVM. Transaction should emit the event from the `l1 payment contract` with the correct value of pmmAmountOut and protocolFee\nExample code transfer\nyou could get paymentAddress at `https://github.com/bitfixyz/bitfi-smartcontract?tab=readme-ov-file#deployed-contracts`\n\n```ts\nimport { config, ensureHexPrefix, ERC20__factory, Payment__factory, routerService } from '@petafixyz/market-maker-sdk'\n\nimport { ITransferStrategy, TransferParams } from '../interfaces/transfer-strategy.interface'\n\n@Injectable()\nexport class EVMTransferStrategy implements ITransferStrategy {\n  private pmmPrivateKey: string\n\n  private routerService = routerService\n  private readonly rpcMap = new Map<string, string>([['ethereum_sepolia', 'https://eth-sepolia.public.blastapi.io']])\n\n  constructor(private configService: ConfigService) {\n    this.pmmPrivateKey = this.configService.getOrThrow<string>('PMM_EVM_PRIVATE_KEY')\n  }\n\n  async transfer(params: TransferParams): Promise<string> {\n    const { toAddress, amount, token, tradeId } = params\n    const { tokenAddress, networkId } = token\n\n    const signer = this.getSigner(networkId)\n\n    const paymentAddress = this.getPaymentAddress(networkId)\n\n    if (tokenAddress !== 'native') {\n      // allowance with ERC20\n    }\n\n    const paymentContract = Payment__factory.connect(paymentAddress, signer)\n\n    const feeDetail = await this.routerService.getFeeDetails(tradeId)\n\n    const deadline = BigInt(Math.floor(Date.now() / 1000) + 30 * 60)\n\n    const decoder = errorDecoder()\n\n    const tx = await paymentContract.payment(\n      tradeId,\n      tokenAddress === 'native' ? ZeroAddress : tokenAddress,\n      toAddress,\n      amount,\n      feeDetail.totalAmount,\n      deadline,\n      {\n        value: tokenAddress === 'native' ? amount : 0n,\n      }\n    )\n\n    this.logger.log(`Transfer transaction sent: ${tx.hash}`)\n\n    return ensureHexPrefix(tx.hash)\n\n  }\n\n  private getSigner(networkId: string) {\n    const rpcUrl = this.rpcMap.get(networkId)\n\n    if (!rpcUrl) {\n      throw new Error(`Unsupported networkId: ${networkId}`)\n    }\n\n    const provider = new ethers.JsonRpcProvider(rpcUrl)\n    return new ethers.Wallet(this.pmmPrivateKey, provider)\n  }\n\n  private getPaymentAddress(networkId: string) {\n    const paymentAddress = config.getPaymentAddress(networkId)\n    if (!paymentAddress) {\n      throw new Error(`Unsupported networkId: ${networkId}`)\n    }\n\n    return paymentAddress\n  }\n}\n```\n\n---\n### Bitcoin\n\nIncase toChain is BTC. Transaction should have at least N + 1 output. with the first N output is the settle utxo for PetaFi trade, and one of them is the change utxo for user with the correct amount. The output N + 1 is the OP_RETURN output with the hash of tradeIds\n\n```ts\nimport * as bitcoin from 'bitcoinjs-lib'\nimport { ECPairFactory } from 'ecpair'\nimport * as ecc from 'tiny-secp256k1'\n\nimport { getTradeIdsHash, Token } from '@petafixyz/market-maker-sdk'\n\nimport { ITransferStrategy, TransferParams } from '../interfaces/transfer-strategy.interface'\n\ninterface UTXO {\n  txid: string\n  vout: number\n  value: number\n  status: {\n    confirmed: boolean\n    block_height: number\n    block_hash: string\n    block_time: number\n  }\n}\n\n@Injectable()\nexport class BTCTransferStrategy implements ITransferStrategy {\n  private readonly privateKey: string\n  private readonly ECPair = ECPairFactory(ecc)\n\n  private readonly networkMap = new Map<string, bitcoin.Network>([\n    ['bitcoin_testnet', bitcoin.networks.testnet],\n    ['bitcoin', bitcoin.networks.bitcoin],\n  ])\n\n  private readonly rpcMap = new Map<string, string>([\n    ['bitcoin_testnet', 'https://blockstream.info/testnet'],\n    ['bitcoin', 'https://blockstream.info'],\n  ])\n\n  constructor(private configService: ConfigService) {\n    this.privateKey = this.configService.getOrThrow<string>('PMM_BTC_PRIVATE_KEY')\n    bitcoin.initEccLib(ecc)\n  }\n\n  async transfer(params: TransferParams): Promise<string> {\n    const { toAddress, amount, token, tradeId } = params\n\n    const network = this.getNetwork(token.networkId)\n    const rpcUrl = this.getRpcUrl(token.networkId)\n\n    const txId = await this.sendBTC(this.privateKey, toAddress, amount, network, rpcUrl, token, [tradeId])\n\n    return ensureHexPrefix(txId)\n  }\n\n  private createPayment(publicKey: Uint8Array, network: bitcoin.Network) {\n    const p2tr = bitcoin.payments.p2tr({\n      internalPubkey: Buffer.from(publicKey.slice(1, 33)),\n      network,\n    })\n\n    return {\n      payment: p2tr,\n      keypair: this.ECPair.fromWIF(this.privateKey, network),\n    }\n  }\n\n  private async sendBTC(\n    privateKey: string,\n    toAddress: string,\n    amountInSatoshis: bigint,\n    network: bitcoin.Network,\n    rpcUrl: string,\n    token: Token,\n    tradeIds: string[]\n  ): Promise<string> {\n    const keyPair = this.ECPair.fromWIF(privateKey, network)\n    const { payment, keypair } = this.createPayment(keyPair.publicKey, network)\n\n    if (!payment.address) {\n      throw new Error('Could not generate address')\n    }\n\n    const utxos = await this.getUTXOs(payment.address, rpcUrl)\n    if (utxos.length === 0) {\n      throw new Error(`No UTXOs found in ${token.networkSymbol} wallet`)\n    }\n\n    const psbt = new bitcoin.Psbt({ network })\n    let totalInput = 0n\n\n    for (const utxo of utxos) {\n      if (!payment.output) {\n        throw new Error('Could not generate output script')\n      }\n\n      const internalKey = Buffer.from(keypair.publicKey.slice(1, 33))\n\n      psbt.addInput({\n        hash: utxo.txid,\n        index: utxo.vout,\n        witnessUtxo: {\n          script: payment.output,\n          value: BigInt(utxo.value),\n        },\n        tapInternalKey: internalKey,\n      })\n\n      totalInput += BigInt(utxo.value)\n    }\n\n    this.logger.log(`Total input: ${totalInput.toString()} ${token.tokenSymbol}`)\n\n    if (totalInput < amountInSatoshis) {\n      throw new Error(\n        `Insufficient balance in ${token.networkSymbol} wallet. ` +\n          `Need ${amountInSatoshis} satoshis, but only have ${totalInput} satoshis`\n      )\n    }\n\n    const feeRate = await this.getFeeRate(rpcUrl)\n    const fee = BigInt(Math.ceil(200 * feeRate))\n    const changeAmount = totalInput - amountInSatoshis - fee\n\n    psbt.addOutput({\n      address: toAddress,\n      value: amountInSatoshis,\n    })\n\n    if (changeAmount > 546n) {\n      psbt.addOutput({\n        address: payment.address,\n        value: changeAmount,\n      })\n    }\n\n    const tradeIdsHash = getTradeIdsHash(tradeIds)\n\n    // FOCUS HERE\n    psbt.addOutput({\n      script: bitcoin.script.compile([bitcoin.opcodes['OP_RETURN'], Buffer.from(tradeIdsHash.slice(2), 'hex')]),\n      value: 0n,\n    })\n\n    const toXOnly = (pubKey: Uint8Array) => (pubKey.length === 32 ? pubKey : pubKey.slice(1, 33))\n    const tweakedSigner = keyPair.tweak(bitcoin.crypto.taggedHash('TapTweak', toXOnly(keyPair.publicKey)))\n\n    for (let i = 0; i < psbt.data.inputs.length; i++) {\n      psbt.signInput(i, tweakedSigner, [bitcoin.Transaction.SIGHASH_DEFAULT])\n      this.logger.log(`Input ${i} signed successfully`)\n    }\n\n    psbt.finalizeAllInputs()\n\n    const tx = psbt.extractTransaction()\n    const rawTx = tx.toHex()\n\n    const response = await axios.post(`${rpcUrl}/api/tx`, rawTx, {\n      headers: {\n        'Content-Type': 'text/plain',\n      },\n    })\n\n    return response.data\n  }\n\n  private async getUTXOs(address: string, rpcUrl: string): Promise<UTXO[]> {\n    const response = await axios.get<UTXO[]>(`${rpcUrl}/api/address/${address}/utxo`)\n    return response.data\n  }\n\n  private async getFeeRate(rpcUrl: string): Promise<number> {\n    try {\n      const response = await axios.get<{ [key: string]: number }>(`${rpcUrl}/api/fee-estimates`)\n      return response.data[0]\n    } catch (error) {\n      console.error(`Error fetching fee rate from ${rpcUrl}:`, error)\n\n      return 1\n    }\n  }\n\n  private getNetwork(networkId: string): bitcoin.Network {\n    const network = this.networkMap.get(networkId)\n    if (!network) {\n      throw new Error(`Unsupported network: ${networkId}`)\n    }\n    return network\n  }\n\n  private getRpcUrl(networkId: string): string {\n    const rpcUrl = this.rpcMap.get(networkId)\n    if (!rpcUrl) {\n      throw new Error(`Unsupported network: ${networkId}`)\n    }\n    return rpcUrl\n  }\n}\n\n```\n---\n","readmeFilename":"README.md"}