Easily validate webhooks received from Curra against the blockchain data from Tatum.

The purpose of the SDK extension is to enable Curra users to validate webhooks received from Curra against the blockchain, eliminating the need to solely trust Curra's data.

Depending on the volume of your validations, a Tatum API Key may be necessary since the free API calls might be insufficient. It is recommended to create a Tatum account here and purchase a plan.

Example:


// initialize Curra SDK
const apiKey = "curra-api-key"

const tatumSdk = await TatumSDK.init({
  // specify webhooks network
  network: Network.ETHEREUM,
  configureExtensions: [
    {
      type: CurraWebhookValidator,
      config: { apiKey },
    },
  ],
  apiKey: {
    v4: 'YOUR_API_KEY'
  }
});

// abort on error
await tatumSdk
  .extension(CurraWebhookValidator)
  .validateBodyOrAbort(request.body);

// return error
const error =  tatumSdk
  .extension(CurraWebhookValidator)
  .validateBody(request.body);

// don't forget to destroy the instance
await tatumSdk.destroy();
Install SDK Extension

import { Curra } from "@curra/sdk";
import { CurraWebhookValidator } from "@curra/tatum-extension";
import { Network, TatumSDK } from "@tatumio/tatum";
Readme / Repository

https://github.com/curraprotocol/tatum-extension

Weekly downloads
N/A
Github Stars
License

MIT License

Last publish
Feb. 5th
Extension Version
1.0.0
SDK Version
4.2.5
Provided by
No items found.