1.0.8 • Published 7 months ago

sdk-four v1.0.8

Weekly downloads
-
License
ISC
Repository
-
Last release
7 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

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago