{"_id":"@classic-terra/log-finder-ruleset","_rev":"1-4e379b68997d25e0e0679826ea82c1e7","name":"@classic-terra/log-finder-ruleset","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@classic-terra/log-finder-ruleset","version":"1.0.0","description":"Terra standard ruleset for well known log patterns","main":"dist/index.js","author":{"name":"Terra Rebels"},"license":"MIT","publishConfig":{"access":"public"},"scripts":{"build":"tsc","format":"prettier --write \"**/*.{js,jsx,ts,tsx}\"","lint":"eslint \"**/*.{js,jsx,ts,tsx}\"","prepublish":"npm run build"},"repository":{"type":"git","url":"git://github.com/classic-terra/log-finder-ruleset.git"},"dependencies":{"@classic-terra/log-finder":"^1.0.0"},"devDependencies":{"@types/node":"^18.0.4","typescript":"^4.3.2"},"types":"./dist/index.d.ts","gitHead":"1a881c57f6ef7f6c56cf4c5412fa042d464af855","bugs":{"url":"https://github.com/classic-terra/log-finder-ruleset/issues"},"homepage":"https://github.com/classic-terra/log-finder-ruleset#readme","_id":"@classic-terra/log-finder-ruleset@1.0.0","_nodeVersion":"16.18.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-Kvx/dX4fyMpLl8ZEA08FjHQ4wYmnkRXiUdQrkFAOYFnv+ry+tRePeVmw8od68r/bwdjd1fg/8117w4y9EMfNwg==","shasum":"01bbd7ee90fcf218f24e52e271ecfcf9f46283b3","tarball":"https://registry.npmjs.org/@classic-terra/log-finder-ruleset/-/log-finder-ruleset-1.0.0.tgz","fileCount":81,"unpackedSize":262106,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHl4U1V1MxzWb2tkaoaBV+zPW/L4vfOENuuu/9A+x0rmAiEA5C3LKS6RApTHLg+I1nRjXzcMlk2+crlZPtK9mScwchQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjldhfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmryLA//TrUQvTMzmI2k29PeLyhq7whHIOyRj+dvIrVeYGzy5stSajK1\r\ntakF/l3iO47//mWLSCW8GahPyHAcqGl+HmwkMt+Jk5qJpin1XNrBxXK1suNG\r\nY9mZtnKl/GhMCdX4hOJYIhNnHjCcpvATWIuio0hVq3GaeJyoZ+ISokH3RHJU\r\ngfmfx6kyGfj/YYHvtSX3uq0pHVGK9IxMXtbeVNg3/JiRCPxkf5bG2p8s9sJ1\r\n7wB6Nl/jbFlM9pThGOe1px0OBbn38pqRGknI6MmFyW1wVFwzKukJzWPRbgTp\r\nJo88EfwV5gSFziPD4zCavBia677Cs8wG183GdB2Mo6O2siKNYxN2jgIFUpOx\r\n+nZzgfNx4KrORzA67NAJmvsHDCexExTsc0c1s7IFV4DVM74P16MldkW0lR7b\r\nyZh7WHgV8mi2N4Z0nXDaI3fD8oWLrs6zy4CtfFVIjlPiRpjQIX4hItYBRF6F\r\nOWUAcMOP5inmzwjl3731TgDiPnjt8ZOyYu7DeFShv+Y5tnGbmuv/dpXxsbgu\r\nhEnkDtk2r9T432uY8sM2jqSEE3hSG/ETkeBfc0y1z25n3wQY+vLzru46dRej\r\no0zuloIdw0iPOo121p2GHkVGcekaeP6oGUfnW66kCEQC8DiqF694u9Hg87Iu\r\n7IrYincm3kVYLBxhZcHXeeiILIaBh4Lq3n0=\r\n=FzJC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"terra-classic","email":"classic.terra.git@gmail.com"},"directories":{},"maintainers":[{"name":"terra-classic","email":"classic.terra.git@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log-finder-ruleset_1.0.0_1670764639468_0.6013256028259286"},"_hasShrinkwrap":false}},"time":{"created":"2022-12-11T13:17:19.394Z","1.0.0":"2022-12-11T13:17:19.697Z","modified":"2023-02-23T09:17:07.066Z"},"maintainers":[{"email":"inon-man@proton.me","name":"inon-man"},{"email":"classic.terra.git@gmail.com","name":"terra-classic"}],"description":"Terra standard ruleset for well known log patterns","homepage":"https://github.com/classic-terra/log-finder-ruleset#readme","repository":{"type":"git","url":"git://github.com/classic-terra/log-finder-ruleset.git"},"author":{"name":"Terra Rebels"},"bugs":{"url":"https://github.com/classic-terra/log-finder-ruleset/issues"},"license":"MIT","readme":"# @classic-terra/log-finder-ruleset\n\nTerra standard ruleset for well known log patterns\n\n## Example codes\n\n```typescript\nimport {\n  createActionRuleSet,\n  createAmountRuleSet\n  createLogMatcherForActions,\n  createLogMatcherForAmounts,\n  getTxCanonicalMsgs,\n  getTxAmounts\n} from \"@classic-terra/log-finder-ruleset\"\n\n// https://phoenix-lcd.terra.dev/cosmos/tx/v1beta1/txs/:txhash\nconst tx = {\n  \"height\": ...,\n  \"txhash\": ...,\n  \"raw_log\": ...,\n  \"logs\": ...,\n  \"gas_wanted\": ...,\n  \"gas_used\": ...,\n  \"tx\": ...,\n  \"timestamp\": ...,\n}\nconst address = \"terra1...\"\nconst network = \"mainnet\"\n\n// getTxCanonicalMsgs\nconst actionRuleset = createActionRuleSet(network)\nconst actionLogMatcher = createLogMatcherForActions(actionRuleset)\nconst actionMatchedMsg = getTxCanonicalMsgs(tx, actionLogMatcher)\n\nconsole.log(actionMatchedMsg)\n\n\n// getTxAmountInfo\nconst amountRuleset = createAmountRuleSet(network)\nconst amountLogMatcher = createLogMatcherForAmounts(amountRuleset)\nconst amountMatchedMsg = getTxAmounts(tx, amountLogMatcher, address)\n\nconsole.log(amountMatchedMsg)\n\n```\n","readmeFilename":"readme.md"}