@superfluid-finance/sdk-core 0.1.1-dev.640e6ae.0 → 0.1.1-dev.7bfb2dd.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -11
- package/dist/main/BatchCall.d.ts +1 -1
- package/dist/main/ConstantFlowAgreementV1.d.ts +2 -2
- package/dist/main/Framework.d.ts +5 -5
- package/dist/main/InstantDistributionAgreementV1.d.ts +2 -2
- package/dist/main/Query.d.ts +3 -3
- package/dist/main/SuperToken.d.ts +2 -2
- package/dist/main/Token.d.ts +1 -1
- package/dist/main/index.d.ts +5 -5
- package/dist/main/index.js +6069 -6048
- package/dist/main/interfaces.d.ts +3 -6
- package/dist/main/ordering.d.ts +1 -1
- package/dist/main/pagination.d.ts +2 -2
- package/dist/main/subgraph/queries/getAllEvents.generated.d.ts +4 -4
- package/dist/main/subgraph/schema.generated.d.ts +33 -42
- package/dist/main/typechain/IResolver.d.ts +17 -3
- package/dist/main/typechain/TestToken.d.ts +8 -0
- package/dist/main/typechain/factories/IResolver__factory.d.ts +15 -2
- package/dist/main/validation.d.ts +1 -1
- package/dist/module/BatchCall.d.ts +1 -1
- package/dist/module/ConstantFlowAgreementV1.d.ts +2 -2
- package/dist/module/Framework.d.ts +5 -5
- package/dist/module/InstantDistributionAgreementV1.d.ts +2 -2
- package/dist/module/Query.d.ts +3 -3
- package/dist/module/SuperToken.d.ts +2 -2
- package/dist/module/Token.d.ts +1 -1
- package/dist/module/index.d.ts +5 -5
- package/dist/module/index.js +6069 -6048
- package/dist/module/interfaces.d.ts +3 -6
- package/dist/module/ordering.d.ts +1 -1
- package/dist/module/pagination.d.ts +2 -2
- package/dist/module/subgraph/queries/getAllEvents.generated.d.ts +4 -4
- package/dist/module/subgraph/schema.generated.d.ts +33 -42
- package/dist/module/typechain/IResolver.d.ts +17 -3
- package/dist/module/typechain/TestToken.d.ts +8 -0
- package/dist/module/typechain/factories/IResolver__factory.d.ts +15 -2
- package/dist/module/validation.d.ts +1 -1
- package/dist/umd/BatchCall.d.ts +1 -1
- package/dist/umd/ConstantFlowAgreementV1.d.ts +2 -2
- package/dist/umd/Framework.d.ts +5 -5
- package/dist/umd/InstantDistributionAgreementV1.d.ts +2 -2
- package/dist/umd/Query.d.ts +3 -3
- package/dist/umd/SuperToken.d.ts +2 -2
- package/dist/umd/Token.d.ts +1 -1
- package/dist/umd/index.d.ts +5 -5
- package/dist/umd/index.js +4162 -4141
- package/dist/umd/interfaces.d.ts +3 -6
- package/dist/umd/ordering.d.ts +1 -1
- package/dist/umd/pagination.d.ts +2 -2
- package/dist/umd/subgraph/queries/getAllEvents.generated.d.ts +4 -4
- package/dist/umd/subgraph/schema.generated.d.ts +33 -42
- package/dist/umd/typechain/IResolver.d.ts +17 -3
- package/dist/umd/typechain/TestToken.d.ts +8 -0
- package/dist/umd/typechain/factories/IResolver__factory.d.ts +15 -2
- package/dist/umd/validation.d.ts +1 -1
- package/package.json +13 -8
package/README.md
CHANGED
|
@@ -786,18 +786,19 @@ const sf = await Framework.create({
|
|
|
786
786
|
provider
|
|
787
787
|
});
|
|
788
788
|
|
|
789
|
-
// 0xabc is the signer
|
|
789
|
+
// 0xabc is the signer on Rinkeby testnet
|
|
790
790
|
const signer = sf.createSigner({ privateKey: "<TEST_ACCOUNT_PRIVATE_KEY>", provider });
|
|
791
|
-
const
|
|
792
|
-
const
|
|
793
|
-
const
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
791
|
+
const daix = await sf.loadSuperToken("0x745861AeD1EEe363b4AaA5F1994Be40b1e05Ff90");
|
|
792
|
+
const fromAddress = "0xabc";
|
|
793
|
+
const paymentAddress = "0xdef";
|
|
794
|
+
const approveOp = daix.approve({ receiver: paymentAddress, amount: "10000" });
|
|
795
|
+
const transferFromOp = daix.transferFrom({
|
|
796
|
+
sender: fromAddress,
|
|
797
|
+
receiver: paymentAddress,
|
|
798
|
+
amount: "10000",
|
|
799
|
+
});
|
|
800
|
+
const batchCall = sf.batchCall([approveOp, transferFromOp]);
|
|
801
|
+
const txn = await batchCall.exec(signer);
|
|
801
802
|
|
|
802
803
|
// creating an operation from a super app function
|
|
803
804
|
// initialize your super app contract
|
package/dist/main/BatchCall.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ethers } from "ethers";
|
|
2
2
|
import Host from "./Host";
|
|
3
|
-
import { IConfig } from "./interfaces";
|
|
4
3
|
import Operation from "./Operation";
|
|
4
|
+
import { IConfig } from "./interfaces";
|
|
5
5
|
interface IBatchCallOptions {
|
|
6
6
|
config: IConfig;
|
|
7
7
|
operations: ReadonlyArray<Operation>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IAgreementV1Options, ICreateFlowParams, IDeleteFlowParams, IUpdateFlowParams, IGetFlowParams, IGetAccountFlowInfoParams, IWeb3FlowInfoParams, IWeb3FlowInfo } from "./interfaces";
|
|
2
|
-
import Operation from "./Operation";
|
|
3
1
|
import Host from "./Host";
|
|
2
|
+
import Operation from "./Operation";
|
|
3
|
+
import { IAgreementV1Options, ICreateFlowParams, IDeleteFlowParams, IGetAccountFlowInfoParams, IGetFlowParams, IUpdateFlowParams, IWeb3FlowInfo, IWeb3FlowInfoParams } from "./interfaces";
|
|
4
4
|
/**
|
|
5
5
|
* @dev Constant Flow Agreement V1 Helper Class
|
|
6
6
|
* @description A helper class to interact with the CFAV1 contract.
|
package/dist/main/Framework.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { ethers } from "ethers";
|
|
2
1
|
import { Signer } from "@ethersproject/abstract-signer";
|
|
3
|
-
import {
|
|
4
|
-
import { DataMode } from "./types";
|
|
2
|
+
import { ethers } from "ethers";
|
|
5
3
|
import BatchCall from "./BatchCall";
|
|
6
4
|
import ConstantFlowAgreementV1 from "./ConstantFlowAgreementV1";
|
|
7
5
|
import Host from "./Host";
|
|
8
6
|
import InstantDistributionAgreementV1 from "./InstantDistributionAgreementV1";
|
|
9
|
-
import SuperToken from "./SuperToken";
|
|
10
|
-
import Query from "./Query";
|
|
11
7
|
import Operation from "./Operation";
|
|
8
|
+
import Query from "./Query";
|
|
9
|
+
import SuperToken from "./SuperToken";
|
|
10
|
+
import { IConfig, ISignerConstructorOptions } from "./interfaces";
|
|
11
|
+
import { DataMode } from "./types";
|
|
12
12
|
export interface IFrameworkOptions {
|
|
13
13
|
chainId?: number;
|
|
14
14
|
customSubgraphQueriesEndpoint?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IAgreementV1Options, IBaseIDAParams, IBaseSubscriptionParams, IDistributeParams, IGetIndexParams, IGetSubscriptionParams, IUpdateIndexValueParams, IUpdateSubscriptionUnitsParams, IWeb3Index, IWeb3Subscription } from "./interfaces";
|
|
2
|
-
import Operation from "./Operation";
|
|
3
1
|
import Host from "./Host";
|
|
2
|
+
import Operation from "./Operation";
|
|
3
|
+
import { IAgreementV1Options, IBaseIDAParams, IBaseSubscriptionParams, IDistributeParams, IGetIndexParams, IGetSubscriptionParams, IUpdateIndexValueParams, IUpdateSubscriptionUnitsParams, IWeb3Index, IWeb3Subscription } from "./interfaces";
|
|
4
4
|
/**
|
|
5
5
|
* @dev Instant Distribution Agreement V1 Helper Class
|
|
6
6
|
* @description A helper class to interact with the IDAV1 contract.
|
package/dist/main/Query.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IAccountTokenSnapshotFilter, IIndex, IIndexRequestFilter, IIndexSubscription, IIndexSubscriptionRequestFilter, ILightAccountTokenSnapshot, ILightEntity, IStream, IStreamRequestFilter, ISuperToken, ISuperTokenRequestFilter } from "./interfaces";
|
|
2
|
-
import { DataMode } from "./types";
|
|
3
|
-
import { PagedResult, Paging } from "./pagination";
|
|
4
1
|
import { AllEvents, IEventFilter } from "./events";
|
|
2
|
+
import { IAccountTokenSnapshotFilter, IIndex, IIndexRequestFilter, IIndexSubscription, IIndexSubscriptionRequestFilter, ILightAccountTokenSnapshot, ILightEntity, IStream, IStreamRequestFilter, ISuperToken, ISuperTokenRequestFilter } from "./interfaces";
|
|
5
3
|
import { Ordering } from "./ordering";
|
|
4
|
+
import { PagedResult, Paging } from "./pagination";
|
|
6
5
|
import { AccountTokenSnapshot_OrderBy, Event_OrderBy, Index_OrderBy, IndexSubscription_OrderBy, Stream_OrderBy, Token_OrderBy } from "./subgraph/schema.generated";
|
|
6
|
+
import { DataMode } from "./types";
|
|
7
7
|
export interface IQueryOptions {
|
|
8
8
|
readonly customSubgraphQueriesEndpoint: string;
|
|
9
9
|
readonly dataMode: DataMode;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { ethers } from "ethers";
|
|
2
|
-
import { IConfig, IRealtimeBalanceOfParams, ISuperTokenBaseIDAParams, ISuperTokenCreateFlowParams, ISuperTokenDeleteFlowParams, ISuperTokenDistributeParams, ISuperTokenGetFlowInfoParams, ISuperTokenGetFlowParams, ISuperTokenGetIndexParams, ISuperTokenGetSubscriptionParams, ISuperTokenPublisherOperationParams, ISuperTokenPubSubParams, ISuperTokenUpdateFlowParams, ISuperTokenUpdateIndexValueParams, ISuperTokenUpdateSubscriptionUnitsParams, IWeb3FlowInfo, IWeb3Index, IWeb3RealTimeBalanceOf, IWeb3Subscription } from "./interfaces";
|
|
3
|
-
import Operation from "./Operation";
|
|
4
2
|
import ConstantFlowAgreementV1 from "./ConstantFlowAgreementV1";
|
|
5
3
|
import InstantDistributionAgreementV1 from "./InstantDistributionAgreementV1";
|
|
4
|
+
import Operation from "./Operation";
|
|
6
5
|
import Token from "./Token";
|
|
6
|
+
import { IConfig, IRealtimeBalanceOfParams, ISuperTokenBaseIDAParams, ISuperTokenCreateFlowParams, ISuperTokenDeleteFlowParams, ISuperTokenDistributeParams, ISuperTokenGetFlowInfoParams, ISuperTokenGetFlowParams, ISuperTokenGetIndexParams, ISuperTokenGetSubscriptionParams, ISuperTokenPublisherOperationParams, ISuperTokenPubSubParams, ISuperTokenUpdateFlowParams, ISuperTokenUpdateIndexValueParams, ISuperTokenUpdateSubscriptionUnitsParams, IWeb3FlowInfo, IWeb3Index, IWeb3RealTimeBalanceOf, IWeb3Subscription } from "./interfaces";
|
|
7
7
|
export interface ITokenSettings {
|
|
8
8
|
readonly address: string;
|
|
9
9
|
readonly config: IConfig;
|
package/dist/main/Token.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ethers } from "ethers";
|
|
2
|
-
import { IBaseSuperTokenParams, ITransferFromParams } from "./interfaces";
|
|
3
2
|
import Operation from "./Operation";
|
|
3
|
+
import { IBaseSuperTokenParams, ITransferFromParams } from "./interfaces";
|
|
4
4
|
export default class Token {
|
|
5
5
|
readonly address: string;
|
|
6
6
|
constructor(address: string);
|
package/dist/main/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import SuperToken from "./SuperToken";
|
|
3
|
-
import Query from "./Query";
|
|
1
|
+
import BatchCall from "./BatchCall";
|
|
4
2
|
import ConstantFlowAgreementV1 from "./ConstantFlowAgreementV1";
|
|
5
|
-
import
|
|
3
|
+
import Framework from "./Framework";
|
|
6
4
|
import Host from "./Host";
|
|
7
|
-
import
|
|
5
|
+
import InstantDistributionAgreementV1 from "./InstantDistributionAgreementV1";
|
|
6
|
+
import Query from "./Query";
|
|
7
|
+
import SuperToken from "./SuperToken";
|
|
8
8
|
export * from "./interfaces";
|
|
9
9
|
export * from "./utils";
|
|
10
10
|
export * from "./pagination";
|