IDA - SDK Core

Send one to many transactions with the Instant Distribution Agreement using the SDK Core

The InstantDistributionAgreementV1 helper class provides access to a variety of IDA functions. You can access this via the Framework class (sf.idaV1) or initialize this as a standalone class.

Using the Framework Class

// Some code
import { Framework } from "@superfluid-finance/sdk-core"
import { ethers } from "ethers";

const sf = await Framework.create({
  chainId: 137,
  provider
});

//access the idaV1 object via the Framework class
//see below for a complete example
const flowInfo = await sf.idaV1.getSubscription(...)

Direct Initialization

import { InstantDistributionAgreementV1 } from "@superfluid-finance/sdk-core";

const config = {
  hostAddress: "0x3E14dC1b13c488a8d5D310918780c983bD5982E7",
  cfaV1Address: "0x6EeE6060f715257b970700bc2656De21dEdF074C",
  idaV1Address: "0xB0aABBA4B2783A72C52956CDEF62d438ecA2d7a1"
};

//load a super token - this can be done by symbol or address
const daix = await sf.loadSuperToken("DAIx");
const idaV1 = new InstantDistributionAgreementV1({ options: config });

IDAV1 Functions

Example Usage

Last updated

Was this helpful?