@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.
Files changed (56) hide show
  1. package/README.md +12 -11
  2. package/dist/main/BatchCall.d.ts +1 -1
  3. package/dist/main/ConstantFlowAgreementV1.d.ts +2 -2
  4. package/dist/main/Framework.d.ts +5 -5
  5. package/dist/main/InstantDistributionAgreementV1.d.ts +2 -2
  6. package/dist/main/Query.d.ts +3 -3
  7. package/dist/main/SuperToken.d.ts +2 -2
  8. package/dist/main/Token.d.ts +1 -1
  9. package/dist/main/index.d.ts +5 -5
  10. package/dist/main/index.js +6069 -6048
  11. package/dist/main/interfaces.d.ts +3 -6
  12. package/dist/main/ordering.d.ts +1 -1
  13. package/dist/main/pagination.d.ts +2 -2
  14. package/dist/main/subgraph/queries/getAllEvents.generated.d.ts +4 -4
  15. package/dist/main/subgraph/schema.generated.d.ts +33 -42
  16. package/dist/main/typechain/IResolver.d.ts +17 -3
  17. package/dist/main/typechain/TestToken.d.ts +8 -0
  18. package/dist/main/typechain/factories/IResolver__factory.d.ts +15 -2
  19. package/dist/main/validation.d.ts +1 -1
  20. package/dist/module/BatchCall.d.ts +1 -1
  21. package/dist/module/ConstantFlowAgreementV1.d.ts +2 -2
  22. package/dist/module/Framework.d.ts +5 -5
  23. package/dist/module/InstantDistributionAgreementV1.d.ts +2 -2
  24. package/dist/module/Query.d.ts +3 -3
  25. package/dist/module/SuperToken.d.ts +2 -2
  26. package/dist/module/Token.d.ts +1 -1
  27. package/dist/module/index.d.ts +5 -5
  28. package/dist/module/index.js +6069 -6048
  29. package/dist/module/interfaces.d.ts +3 -6
  30. package/dist/module/ordering.d.ts +1 -1
  31. package/dist/module/pagination.d.ts +2 -2
  32. package/dist/module/subgraph/queries/getAllEvents.generated.d.ts +4 -4
  33. package/dist/module/subgraph/schema.generated.d.ts +33 -42
  34. package/dist/module/typechain/IResolver.d.ts +17 -3
  35. package/dist/module/typechain/TestToken.d.ts +8 -0
  36. package/dist/module/typechain/factories/IResolver__factory.d.ts +15 -2
  37. package/dist/module/validation.d.ts +1 -1
  38. package/dist/umd/BatchCall.d.ts +1 -1
  39. package/dist/umd/ConstantFlowAgreementV1.d.ts +2 -2
  40. package/dist/umd/Framework.d.ts +5 -5
  41. package/dist/umd/InstantDistributionAgreementV1.d.ts +2 -2
  42. package/dist/umd/Query.d.ts +3 -3
  43. package/dist/umd/SuperToken.d.ts +2 -2
  44. package/dist/umd/Token.d.ts +1 -1
  45. package/dist/umd/index.d.ts +5 -5
  46. package/dist/umd/index.js +4162 -4141
  47. package/dist/umd/interfaces.d.ts +3 -6
  48. package/dist/umd/ordering.d.ts +1 -1
  49. package/dist/umd/pagination.d.ts +2 -2
  50. package/dist/umd/subgraph/queries/getAllEvents.generated.d.ts +4 -4
  51. package/dist/umd/subgraph/schema.generated.d.ts +33 -42
  52. package/dist/umd/typechain/IResolver.d.ts +17 -3
  53. package/dist/umd/typechain/TestToken.d.ts +8 -0
  54. package/dist/umd/typechain/factories/IResolver__factory.d.ts +15 -2
  55. package/dist/umd/validation.d.ts +1 -1
  56. 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 usdcx = sf.loadToken("0xCAa7349CEA390F89641fe306D93591f87595dc1F");
792
- const approveOp = usdcx.approve({ receiver: "0xdef", amount: "10000" });
793
- const transferFromOp = usdcx.transferFrom({
794
- sender: "0xabc",
795
- receiver: "0xdef",
796
- amount: "10000",
797
- });
798
- const batchCall = framework.batchCall([approveOp, transferFromOp]);
799
- const txn = await batchCall.execute(signer);
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
@@ -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.
@@ -1,14 +1,14 @@
1
- import { ethers } from "ethers";
2
1
  import { Signer } from "@ethersproject/abstract-signer";
3
- import { IConfig, ISignerConstructorOptions } from "./interfaces";
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.
@@ -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;
@@ -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);
@@ -1,10 +1,10 @@
1
- import Framework from "./Framework";
2
- import SuperToken from "./SuperToken";
3
- import Query from "./Query";
1
+ import BatchCall from "./BatchCall";
4
2
  import ConstantFlowAgreementV1 from "./ConstantFlowAgreementV1";
5
- import InstantDistributionAgreementV1 from "./InstantDistributionAgreementV1";
3
+ import Framework from "./Framework";
6
4
  import Host from "./Host";
7
- import BatchCall from "./BatchCall";
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";