{"_id":"@daodiseomoney/log-finder-ruleset","name":"@daodiseomoney/log-finder-ruleset","dist-tags":{"latest":"3.0.0"},"versions":{"3.0.0":{"name":"@daodiseomoney/log-finder-ruleset","version":"3.0.0","description":"Daodiseo standard ruleset for well known log patterns","main":"dist/index.js","author":{"name":"Daodiseoform Labs, PTE."},"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/daodiseomoney/log-finder-ruleset.git"},"peerDependencies":{"@daodiseomoney/daodiseo.js":"^3"},"dependencies":{"@terra-money/log-finder":"^1.1.6","typescript":"^4.7.4"},"devDependencies":{"@daodiseomoney/daodiseo.js":"^3.0.7"},"gitHead":"67f8a5f46aedae20d2e89be889cccc42bded8f0b","bugs":{"url":"https://github.com/daodiseomoney/log-finder-ruleset/issues"},"homepage":"https://github.com/daodiseomoney/log-finder-ruleset#readme","_id":"@daodiseomoney/log-finder-ruleset@3.0.0","_nodeVersion":"10.19.0","_npmVersion":"6.14.4","dist":{"integrity":"sha512-6+cj6eoADfoK+xW0yFB3TUC3DmmEe+sfGUmakszW3+niK9OG84efWXGyZ5lJOWsbE3eNQ8T7iFQ76MWmCIbx1w==","shasum":"93fb7de82e6f71baa44cc5832614b84c79ccce6e","tarball":"https://registry.npmjs.org/@daodiseomoney/log-finder-ruleset/-/log-finder-ruleset-3.0.0.tgz","fileCount":84,"unpackedSize":263499,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0/BIwVclVHEm0OO3YDcGbieko1mej1iKCzD+3PokY8QIgTOUAjsG9r4/hfaoGKT1iiXBdzSQ3PSPT7Lr1+upBv8U="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi3WIrACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqeLRAAheSK0B/zyuzeyw8/+EcH2aj4ESDQ6d9k9Jb2y1Fqo5dbOjg7\r\norybV6ERWaVD4/pkrOCpmj5rh7oJ+P/J+NmcDF6vVWPnrkzHcLSA8jKp9boz\r\nMcqjI/TWs5yQ/K1p5NppydSwzM6MXpqbMcLaB6+K4pgYbbwfFIuqYtKidwaG\r\nvQGpzECrEfm5YFjapeNwjBIEUjlM1ctBA2C+BXgfvSDFHHEtjw2/74j/IxHc\r\nk1n9f/WrCqGpxu/lxGjVov/5t2CoqygldjRxiKipbaiE6uaP/DPzSIDM4pgg\r\nEkb3LHsFqFO306k5dv20tLzUEYUFfU8adyiijfxqfAJxZSxD7C4tO7xs9n27\r\nNuNUFMgvCXsvXNiXqSxdwSDEmcPjAvc1jHNaEEI8ectVvL4MQEx/H3ZnjMqJ\r\n14mLUlUKkPSBp3MTKmvG//WKlfdT5hzEooBA7reepexpaJokxMoKTF55rtmw\r\nICf2alegp5ffa3MqIc3MhUQIGVE8P7YrgKFfOFpaqrL+wYiQ6w1cIpv0aCCM\r\nZo7bjSL+lhInLHRqlsjEjTGu2twi2W1kPe11HMEn14IBWKw9OKMd9yS9/THY\r\nehAYSr8KIsuADJYAIIxOF9M5nLI7v4AgjFSpxa24nuSsbjUWw1pGe343e4TI\r\nYM9M8MlnrGK8qSF+78zrc00tbdX8hFzrn88=\r\n=Pd0Y\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"swarych","email":"stanislaw.warych@gmail.com"},"directories":{},"maintainers":[{"name":"swarych","email":"stanislaw.warych@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/log-finder-ruleset_3.0.0_1658675754965_0.5755175946696802"},"_hasShrinkwrap":false}},"time":{"created":"2022-07-24T15:15:54.904Z","3.0.0":"2022-07-24T15:15:55.169Z","modified":"2022-07-24T15:15:55.362Z"},"maintainers":[{"name":"swarych","email":"stanislaw.warych@gmail.com"}],"description":"Daodiseo standard ruleset for well known log patterns","homepage":"https://github.com/daodiseomoney/log-finder-ruleset#readme","repository":{"type":"git","url":"git://github.com/daodiseomoney/log-finder-ruleset.git"},"author":{"name":"Daodiseoform Labs, PTE."},"bugs":{"url":"https://github.com/daodiseomoney/log-finder-ruleset/issues"},"license":"MIT","readme":"# @daodiseomoney/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 \"@daodiseomoney/log-finder-ruleset\"\n\n// https://lcd.daodiseo.dev/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 = \"daodiseo1...\"\nconst network = \"mainnet\"\n\n// getTxCanonicalMsgs\nconst actionRuleset = createActionRuleSet(network)\nconst actionLogMatcher = createLogMatcherForActions(actionRuleset)\nconst actionMatchedMsg = getTxCanonicalMsgs(JSON.stringify(tx), actionLogMatcher)\n\nconsole.log(actionMatchedMsg)\n\n\n// getTxAmountInfo\nconst amountRuleset = createAmountRuleSet(network)\nconst amountLogMatcher = createLogMatcherForAmounts(amountRuleset)\nconst amountMatchedMsg = getTxAmounts(JSON.stringify(tx), amountLogMatcher, address)\n\nconsole.log(amountMatchedMsg)\n\n```\n","readmeFilename":"readme.md"}