{"_id":"@0xos/sourcify-abi-retriever","_rev":"3-6eb339851f72cf72ab67e1026088b975","name":"@0xos/sourcify-abi-retriever","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@0xos/sourcify-abi-retriever","repository":{"type":"git","url":"git+https://github.com/financesaucer/0xos-sourcify-abi-retriever.git"},"version":"1.0.0","main":"dist/index.js","author":{"name":"financesaucer","email":"financesaucer@proton.me"},"license":"MIT","dependencies":{"axios":"^1.5.1"},"scripts":{"build":"tsc -p ./tsconfig.json","test":"node ./dist/test.js"},"_id":"@0xos/sourcify-abi-retriever@1.0.0","gitHead":"936895978decf36f154acbb5dd7a673c118b8ab7","types":"./dist/index.d.ts","description":"![Sourcify ABI Retriever](https://freeimage.host/i/J2YbgMF.png)","bugs":{"url":"https://github.com/financesaucer/0xos-sourcify-abi-retriever/issues"},"homepage":"https://github.com/financesaucer/0xos-sourcify-abi-retriever#readme","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-65fgj1I4S30SFVrWUuMPTIx2ORdVPMmESd24c3RKuy8Mm+kLGtioI+o+OogXgNTQhCocBr3k6SS5WlvX2o6PTA==","shasum":"47ec0579631d04cc23c9035013c4cbfeb5dafcb3","tarball":"https://registry.npmjs.org/@0xos/sourcify-abi-retriever/-/sourcify-abi-retriever-1.0.0.tgz","fileCount":9,"unpackedSize":21353,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCUpoFIecCmGKxgn5lTjwFNQIGvuhc9SMSV9Ff79CRIWgIgTVKLNPc0sugbTZDeCmGmxRvj/wQFLlllv5lJ6/rsRwA="}]},"_npmUser":{"name":"financesaucer","email":"financesaucer@proton.me"},"directories":{},"maintainers":[{"name":"financesaucer","email":"financesaucer@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sourcify-abi-retriever_1.0.0_1696603505217_0.571150303314468"},"_hasShrinkwrap":false},"1.0.1":{"name":"@0xos/sourcify-abi-retriever","repository":{"type":"git","url":"git+https://github.com/financesaucer/0xos-sourcify-abi-retriever.git"},"version":"1.0.1","main":"dist/index.js","author":{"name":"financesaucer","email":"financesaucer@proton.me"},"license":"MIT","dependencies":{"axios":"^1.5.1"},"scripts":{"build":"tsc -p ./tsconfig.json","test":"node ./dist/test.js"},"_id":"@0xos/sourcify-abi-retriever@1.0.1","gitHead":"652380451588c94d3f93f7b33f946e7258d4bf22","types":"./dist/index.d.ts","description":"![Sourcify ABI Retriever](https://github.com/financesaucer/0xos-sourcify-abi-retriever/blob/main/logo.png)","bugs":{"url":"https://github.com/financesaucer/0xos-sourcify-abi-retriever/issues"},"homepage":"https://github.com/financesaucer/0xos-sourcify-abi-retriever#readme","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-S+OQkT3z+6GNPROFP81l+lSmksUz7EbqjhGRud1tPBgZ6D2yo2iMdK3tmQNk88E6u0BmgwZjmylSh9bQbLpG3Q==","shasum":"0da6c2f048ee6e29eee87e4368ef4460e533d10e","tarball":"https://registry.npmjs.org/@0xos/sourcify-abi-retriever/-/sourcify-abi-retriever-1.0.1.tgz","fileCount":10,"unpackedSize":210966,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC86ntA9Y649qLEpoJp4VOFiAI5gg1yqHSonkatn9wVOQIgWk+XQeYS7yaQG3neqr4M3ypgUXsqpJ34FYz20VjWgyg="}]},"_npmUser":{"name":"financesaucer","email":"financesaucer@proton.me"},"directories":{},"maintainers":[{"name":"financesaucer","email":"financesaucer@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sourcify-abi-retriever_1.0.1_1696603869564_0.5215576704481544"},"_hasShrinkwrap":false},"1.0.2":{"name":"@0xos/sourcify-abi-retriever","repository":{"type":"git","url":"git+https://github.com/financesaucer/0xos-sourcify-abi-retriever.git"},"version":"1.0.2","main":"dist/index.js","author":{"name":"financesaucer","email":"financesaucer@proton.me"},"license":"MIT","dependencies":{"axios":"^1.5.1"},"scripts":{"build":"tsc -p ./tsconfig.json","test":"node ./dist/test.js"},"_id":"@0xos/sourcify-abi-retriever@1.0.2","gitHead":"f6a1c2a78d0c416986ef3455a342a64fecb21329","types":"./dist/index.d.ts","description":"![Sourcify ABI Retriever](./logo.png)","bugs":{"url":"https://github.com/financesaucer/0xos-sourcify-abi-retriever/issues"},"homepage":"https://github.com/financesaucer/0xos-sourcify-abi-retriever#readme","_nodeVersion":"18.18.0","_npmVersion":"9.8.1","dist":{"integrity":"sha512-m8zcNE0c4I2/09PjziigYyHQznLbOkC7geZtrv2QhKnIBDK91rFU5BLt18CrJEzaTM2Ii/ovWxws+ZKZLl5YAg==","shasum":"2e7e76837fb9a499fb5638e35f30f98e73bd9c20","tarball":"https://registry.npmjs.org/@0xos/sourcify-abi-retriever/-/sourcify-abi-retriever-1.0.2.tgz","fileCount":9,"unpackedSize":21327,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDJ/nUzQldJv3QwcRL1BIDTLevNWXmq+cpbY/M/vM00TgIgUAtOymSQxDu+I5+SmGNiuQ9nWyzgTEnxvimgRdet8qw="}]},"_npmUser":{"name":"financesaucer","email":"financesaucer@proton.me"},"directories":{},"maintainers":[{"name":"financesaucer","email":"financesaucer@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sourcify-abi-retriever_1.0.2_1696672057009_0.8222214753477344"},"_hasShrinkwrap":false},"1.0.3":{"name":"@0xos/sourcify-abi-retriever","repository":{"type":"git","url":"git+https://github.com/financesaucer/0xos-sourcify-abi-retriever.git"},"version":"1.0.3","main":"dist/index.js","author":{"name":"financesaucer","email":"financesaucer@proton.me"},"license":"MIT","dependencies":{"axios":"^1.5.1"},"scripts":{"build":"tsc -p ./tsconfig.json","test":"node ./dist/test.js"},"devDependencies":{"tsc":"^2.0.4","typescript":"^5.2.2"},"_id":"@0xos/sourcify-abi-retriever@1.0.3","gitHead":"8e79b07c695e0f3c0f6d4aa312af0aece0114736","types":"./dist/index.d.ts","description":"![Sourcify ABI Retriever](./logo.png)","bugs":{"url":"https://github.com/financesaucer/0xos-sourcify-abi-retriever/issues"},"homepage":"https://github.com/financesaucer/0xos-sourcify-abi-retriever#readme","_nodeVersion":"18.18.2","_npmVersion":"9.8.1","dist":{"integrity":"sha512-1i7fKO2772EosAgnLuYtficWMcpSZrxPyFJpjA2gii3L81YxL/QU/Jg0FyQRkKjCzuG22E+JXVcwWAbBChXq5g==","shasum":"596494042b8336fc1785c6b6b1eec61d565b18e7","tarball":"https://registry.npmjs.org/@0xos/sourcify-abi-retriever/-/sourcify-abi-retriever-1.0.3.tgz","fileCount":9,"unpackedSize":21341,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDX2G/x2wP3vdO1CLnRA4sl0a9ywIIF/iOom9OdxEp5tAiBEfS3xzIAqyOJb0ppAaui2uDX39wM0IwPBBODhLBYeYQ=="}]},"_npmUser":{"name":"financesaucer","email":"financesaucer@proton.me"},"directories":{},"maintainers":[{"name":"financesaucer","email":"financesaucer@proton.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/sourcify-abi-retriever_1.0.3_1699805068909_0.2883908247167024"},"_hasShrinkwrap":false}},"time":{"created":"2023-10-06T14:45:05.116Z","1.0.0":"2023-10-06T14:45:05.423Z","modified":"2023-11-12T16:04:29.360Z","1.0.1":"2023-10-06T14:51:09.717Z","1.0.2":"2023-10-07T09:47:37.224Z","1.0.3":"2023-11-12T16:04:29.138Z"},"maintainers":[{"name":"financesaucer","email":"financesaucer@proton.me"}],"description":"![Sourcify ABI Retriever](./logo.png)","homepage":"https://github.com/financesaucer/0xos-sourcify-abi-retriever#readme","repository":{"type":"git","url":"git+https://github.com/financesaucer/0xos-sourcify-abi-retriever.git"},"author":{"name":"financesaucer","email":"financesaucer@proton.me"},"bugs":{"url":"https://github.com/financesaucer/0xos-sourcify-abi-retriever/issues"},"license":"MIT","readme":"# Sourcify ABI Retriever\n\n![Sourcify ABI Retriever](./logo.png)\n\nRetrieve Verifyied Smart Contract ABIs Effortlessly From Sourcify with @0xos/sourcify-abi-retriever\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\nWith NPM:\n\n```bash\nnpm install @0xos/sourcify-abi-retriever\n```\n\nWith Yarn:\n\n```bash\nnpm install @0xos/sourcify-abi-retriever\n```\n\n## Usage\n\n###  Import the Functions\n\nImport the necessary functions from the package into your TypeScript file.\n\n```typescript\nimport { checkAndRetrieveABI, checkIfIsVerified, retrieveMetadataFile } from 'your-package-name';\n```\n\n### Define Contract Information\n\nCreate an instance of the `ContractInfo` interface, specifying the contract address and optional chain IDs and server.\n\n```typescript\nconst contractInfo: ContractInfo = {\n  address: '0x1234567890ABCDEF',\n  chainIds: [1, 56], \n  //if undefined, it will check for all most popular chains\n  server: 'https://custom-sourcify-endpoint.com/api' \n  //if undefined, it will use the standard sourcify api\n};\n```\n\n### Check and Retrieve ABI\n\nUse the `checkAndRetrieveABI` function to check if the contract is verified and retrieve its ABI.\n\n```typescript\nasync function getContractABI() {\n  try {\n    const contractResult = await checkAndRetrieveABI(contractInfo);\n\n    if (contractResult) {\n      console.log('Contract status:', contractResult.status);\n      console.log('Contract name:', contractResult.name);\n      console.log('Contract ABI:', contractResult.abi);\n    } else {\n      console.log('Contract not found or ABI not available.');\n    }\n  } catch (error) {\n    console.error('Error:', error.message);\n  }\n}\n\ngetContractABI();\n```\n\nReplace `'0x1234567890ABCDEF'` with the actual contract address and modify the chain IDs and server as needed.\n\n### Additional Notes\n- The `checkAndRetrieveABI` function returns a `ContractResult` object, including the contract status, name, and ABI.\n- The `checkIfIsVerified` and `retrieveMetadataFile` functions are also available for more specific use cases related to contract verification and metadata retrieval.\n\n## Contributing\n\nIf you'd like to contribute to this project, please make a pull request.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n---\n\n## Support\n\nIf you have any questions or need assistance, feel free to [open an issue](https://github.com/financesaucer/0xos-sourcify-abi-retriver/issues)\n\n## Acknowledgements\n\nSpecial thanks to Sourcify for their invaluable API that made smart contract ABI retrieval and verification possible. We also appreciate the capabilities provided by Axios for making HTTP requests seamlessly.\n\n## Author\n\n[financesaucer](https://github.com/financesaucer)\n\n---\n\nFeel free to add more sections or customize the content to match your package's specifics. The README should provide users with essential information about your package, how to install and use it, how to contribute, and how to reach out for support or questions.\n","readmeFilename":"README.md"}