1.0.8 • Published 10 months ago

sdk-four v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

DAO CPI SDK

Installation

npm install dao-cpi-sdk
# or
yarn add dao-cpi-sdk

Usage

Initialization

import DAOCPISDK from "dao-cpi-sdk";

const sdk = new DAOCPISDK({
  apiKey: "your-api-key-here",
});

Calculate CPI

try {
  const cpiData = await sdk.calculateCPI();
  console.log(cpiData);
} catch (error) {
  console.error("CPI Calculation Error:", error);
}

Calculate Temporary CPI

try {
  const tempCpiData = await sdk.calculateTempCPI(
    "0x1234...delegator-address",
    "0x5678...destination-address"
  );
  console.log(tempCpiData);
} catch (error) {
  console.error("Temporary CPI Calculation Error:", error);
}

Error Handling

The SDK provides detailed error handling for various scenarios.

Requirements

  • Node.js 14+
  • Valid API Key
1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago