{"_id":"@curra/tatum-extension","_rev":"1-8349aeaa6363c5f1bdaab31f270615a8","name":"@curra/tatum-extension","dist-tags":{"latest":"0.1.1"},"versions":{"0.0.1":{"name":"@curra/tatum-extension","version":"0.0.1","main":"dist/index.js","module":"dist/index.mjs","private":false,"license":"MIT","devDependencies":{"@tatumio/tatum":"^4.1.34","tsup":"^7.2.0","typescript":"^4.8.4","vitest":"^0.34.2","@curra/sdk":"1.3.2"},"peerDependencies":{"@curra/sdk":"x.x.x"},"engines":{"node":">=18"},"dependencies":{"decimal.js-light":"^2.5.1","viem":"^2.0.0"},"scripts":{"test":"vitest","build":"tsup src/index.ts --dts-resolve --format esm,cjs,iife","watch":"tsup src/index.ts --dts-resolve --watch --format esm,cjs,iife"},"types":"./dist/index.d.ts","description":"The purpose of the extension is to enable Curra users to validate webhooks received from Curra against the blockchain, eliminating the need to solely trust Curra's data.","_id":"@curra/tatum-extension@0.0.1","_integrity":"sha512-WAiMQEwkxhRRrSzIeMy8owoUy1bj9ktsmNQNqinKjM/o0pD+7Ajtq5S0OBI9pi1s4mNMG5OYzmM2h+kLc/RCdA==","_resolved":"/private/var/folders/_n/c5skqfxs7_d49x2c4n7pt4k80000gn/T/7574d1f3f22e93a9a52a4c2aac637cec/curra-tatum-extension-0.0.1.tgz","_from":"file:curra-tatum-extension-0.0.1.tgz","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-WAiMQEwkxhRRrSzIeMy8owoUy1bj9ktsmNQNqinKjM/o0pD+7Ajtq5S0OBI9pi1s4mNMG5OYzmM2h+kLc/RCdA==","shasum":"a5809137d13f30804f93acfb3b962e03a38f7f9a","tarball":"https://registry.npmjs.org/@curra/tatum-extension/-/tatum-extension-0.0.1.tgz","fileCount":13,"unpackedSize":1664410,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFdqu6wC3F57fo7GdJ9J+buEie2AUqEZ9RfKH+j8vSdXAiAN9mOv0pNVDlXZN8G6cfncm+jyzAQnKOJqOzrURh8wWg=="}]},"_npmUser":{"name":"curra","email":"dmytro@curra.io"},"directories":{},"maintainers":[{"name":"curra","email":"dmytro@curra.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tatum-extension_0.0.1_1704386544717_0.6221770618552429"},"_hasShrinkwrap":false},"0.1.1":{"name":"@curra/tatum-extension","version":"0.1.1","main":"dist/index.js","module":"dist/index.mjs","private":false,"scripts":{"test":"vitest","build":"tsup src/index.ts --dts-resolve --format esm,cjs,iife","watch":"tsup src/index.ts --dts-resolve --watch --format esm,cjs,iife"},"license":"MIT","devDependencies":{"@curra/sdk":"workspace:*","@tatumio/tatum":"^4.1.34","tsup":"^7.2.0","typescript":"^4.8.4","vitest":"^0.34.2"},"peerDependencies":{"@curra/sdk":"x.x.x"},"engines":{"node":">=18"},"dependencies":{"decimal.js-light":"^2.5.1","viem":"^2.0.0"},"types":"./dist/index.d.ts","gitHead":"eced2dc2ef7cbd5ed152c649b4244c909ae3aadb","description":"The purpose of the extension is to enable Curra users to validate webhooks received from Curra against the blockchain, eliminating the need to solely trust Curra's data.","_id":"@curra/tatum-extension@0.1.1","_nodeVersion":"18.12.1","_npmVersion":"8.19.2","dist":{"integrity":"sha512-PCEVq6mrNDVyY4j/DnCLUTBjWmlRIhThLzHRRtUYZeK4V9czZKj78HUwymLHQb9F5KUBAVX5uOF/p21O5twFHA==","shasum":"6a9a39cfa12a6a4459197a29ff55569ffbb72ec6","tarball":"https://registry.npmjs.org/@curra/tatum-extension/-/tatum-extension-0.1.1.tgz","fileCount":13,"unpackedSize":2164453,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDN0X6jL/HtwN7mmLXmVyNn5i61t7U2D5FoFmNrdiSM0gIgbfcUHI0TPD4Xg+a82DlztXO1b2X/kxpRXKNlHPXLgM8="}]},"_npmUser":{"name":"curra","email":"dmytro@curra.io"},"directories":{},"maintainers":[{"name":"curra","email":"dmytro@curra.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/tatum-extension_0.1.1_1706289051327_0.4465556693989754"},"_hasShrinkwrap":false}},"time":{"created":"2024-01-04T16:42:24.651Z","0.0.1":"2024-01-04T16:42:24.968Z","modified":"2024-01-26T17:10:51.729Z","0.1.1":"2024-01-26T17:10:51.551Z"},"maintainers":[{"name":"curra","email":"dmytro@curra.io"}],"description":"The purpose of the extension is to enable Curra users to validate webhooks received from Curra against the blockchain, eliminating the need to solely trust Curra's data.","license":"MIT","readme":"# Curra Tatum Extension\n\nThe purpose of the extension is to enable Curra users to validate webhooks received from Curra against the blockchain, eliminating the need to solely trust Curra's data.\n\n# Prerequisites\n\nDepending on the volume of your validations, a [Tatum](https://tatum.io) API Key may be necessary since the free API calls might be insufficient. It is recommended to create a [Tatum](https://tatum.io) account [here](https://dashboard.tatum.io/signup) and purchase a non-free plan.\n\n# How to use\n\n```typescript\nimport { Curra } from \"@curra/sdk\";\nimport { CurraWebhookValidator } from \"@curra/tatum-extension\";\nimport { Network, TatumSDK } from \"@tatumio/tatum\";\n\n// initialize Curra SDK\nconst curra = Curra.fromApiKey({ apiKey });\n\nconst tatumSdk = await TatumSDK.init({\n  // specify webhooks network\n  network: Network.ETHEREUM,\n  configureExtensions: [\n    {\n      type: CurraWebhookValidator,\n      config: { curra },\n    },\n  ],\n  apiKey: {\n    v4: 'YOUR_API_KEY'\n  }\n});\n\n// abort on error\nawait tatumSdk\n  .extension(CurraWebhookValidator)\n  .validateBodyOrAbort(request.body);\n\n// return error\nconst error =  tatumSdk\n  .extension(CurraWebhookValidator)\n  .validateBody(request.body);\n\n// don't forget to destroy the instance\nawait tatumSdk.destroy();\n```\n\n# Contributing\n**Warning**:\nThe repository isn't intended for use in a development environment, as it was extracted from Curra team's private monorepository. \n\nNonetheless, contributions are appreciated! You can contribute by creating an issue to propose a new feature or report a bug.\n\n\n\n\n# License\nDistributed under the MIT License. See LICENSE for more information.\n","readmeFilename":"README.md"}