@superfluid-finance/sdk-core 0.1.1-dev.fa49a94.0 → 0.2.1-dev.64549c3.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 +124 -53
- package/dist/index.umd.js +63560 -0
- package/dist/main/BatchCall.d.ts +2 -2
- package/dist/main/BatchCall.d.ts.map +1 -0
- package/dist/main/BatchCall.js +128 -0
- package/dist/main/BatchCall.js.map +1 -0
- package/dist/main/ConstantFlowAgreementV1.d.ts +7 -3
- package/dist/main/ConstantFlowAgreementV1.d.ts.map +1 -0
- package/dist/main/ConstantFlowAgreementV1.js +178 -0
- package/dist/main/ConstantFlowAgreementV1.js.map +1 -0
- package/dist/main/Framework.d.ts +7 -2
- package/dist/main/Framework.d.ts.map +1 -0
- package/dist/main/Framework.js +181 -0
- package/dist/main/Framework.js.map +1 -0
- package/dist/main/Host.d.ts +6 -1
- package/dist/main/Host.d.ts.map +1 -0
- package/dist/main/Host.js +31 -0
- package/dist/main/Host.js.map +1 -0
- package/dist/main/InstantDistributionAgreementV1.d.ts +18 -9
- package/dist/main/InstantDistributionAgreementV1.d.ts.map +1 -0
- package/dist/main/InstantDistributionAgreementV1.js +249 -0
- package/dist/main/InstantDistributionAgreementV1.js.map +1 -0
- package/dist/main/Operation.d.ts +1 -0
- package/dist/main/Operation.d.ts.map +1 -0
- package/dist/main/Operation.js +86 -0
- package/dist/main/Operation.js.map +1 -0
- package/dist/main/Query.d.ts +1 -0
- package/dist/main/Query.d.ts.map +1 -0
- package/dist/main/Query.js +311 -0
- package/dist/main/Query.js.map +1 -0
- package/dist/main/SFError.d.ts +3 -2
- package/dist/main/SFError.d.ts.map +1 -0
- package/dist/main/SFError.js +36 -0
- package/dist/main/SFError.js.map +1 -0
- package/dist/main/SuperToken.d.ts +34 -14
- package/dist/main/SuperToken.d.ts.map +1 -0
- package/dist/main/SuperToken.js +398 -0
- package/dist/main/SuperToken.js.map +1 -0
- package/dist/main/Token.d.ts +7 -3
- package/dist/main/Token.d.ts.map +1 -0
- package/dist/main/Token.js +166 -0
- package/dist/main/Token.js.map +1 -0
- package/dist/main/abi/ERC20WithTokenInfo.json +224 -0
- package/dist/main/abi/IConstantFlowAgreementV1.json +406 -0
- package/dist/main/abi/IInstantDistributionAgreementV1.json +947 -0
- package/dist/main/abi/IResolver.json +58 -0
- package/dist/main/abi/SuperToken.json +1549 -0
- package/dist/main/abi/Superfluid.json +1159 -0
- package/dist/main/abi/SuperfluidLoader.json +54 -0
- package/dist/main/constants.d.ts +10 -2
- package/dist/main/constants.d.ts.map +1 -0
- package/dist/main/constants.js +134 -0
- package/dist/main/constants.js.map +1 -0
- package/dist/main/events.d.ts +1 -0
- package/dist/main/events.d.ts.map +1 -0
- package/dist/main/events.js +3 -0
- package/dist/main/events.js.map +1 -0
- package/dist/main/frameworkHelpers.d.ts +1 -0
- package/dist/main/frameworkHelpers.d.ts.map +1 -0
- package/dist/main/frameworkHelpers.js +90 -0
- package/dist/main/frameworkHelpers.js.map +1 -0
- package/dist/main/index.d.ts +6 -0
- package/dist/main/index.d.ts.map +1 -0
- package/dist/main/index.js +38 -7524
- package/dist/main/index.js.map +1 -0
- package/dist/main/interfaces.d.ts +100 -11
- package/dist/main/interfaces.d.ts.map +1 -0
- package/dist/main/interfaces.js +3 -0
- package/dist/main/interfaces.js.map +1 -0
- package/dist/main/mapGetAllEventsQueryEvents.d.ts +1 -0
- package/dist/main/mapGetAllEventsQueryEvents.d.ts.map +1 -0
- package/dist/main/mapGetAllEventsQueryEvents.js +432 -0
- package/dist/main/mapGetAllEventsQueryEvents.js.map +1 -0
- package/dist/main/ordering.d.ts +1 -0
- package/dist/main/ordering.d.ts.map +1 -0
- package/dist/main/ordering.js +3 -0
- package/dist/main/ordering.js.map +1 -0
- package/dist/main/pagination.d.ts +1 -0
- package/dist/main/pagination.d.ts.map +1 -0
- package/dist/main/pagination.js +60 -0
- package/dist/main/pagination.js.map +1 -0
- package/dist/main/subgraph/SubgraphClient.d.ts +1 -0
- package/dist/main/subgraph/SubgraphClient.d.ts.map +1 -0
- package/dist/main/subgraph/SubgraphClient.js +51 -0
- package/dist/main/subgraph/SubgraphClient.js.map +1 -0
- package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.d.ts +1 -0
- package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.d.ts.map +1 -0
- package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.js +5 -0
- package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.js.map +1 -0
- package/dist/main/subgraph/queries/getAllEvents.generated.d.ts +1 -0
- package/dist/main/subgraph/queries/getAllEvents.generated.d.ts.map +1 -0
- package/dist/main/subgraph/queries/getAllEvents.generated.js +6 -0
- package/dist/main/subgraph/queries/getAllEvents.generated.js.map +1 -0
- package/dist/main/subgraph/queries/getIndexSubscriptions.generated.d.ts +1 -0
- package/dist/main/subgraph/queries/getIndexSubscriptions.generated.d.ts.map +1 -0
- package/dist/main/subgraph/queries/getIndexSubscriptions.generated.js +5 -0
- package/dist/main/subgraph/queries/getIndexSubscriptions.generated.js.map +1 -0
- package/dist/main/subgraph/queries/getIndexes.generated.d.ts +1 -0
- package/dist/main/subgraph/queries/getIndexes.generated.d.ts.map +1 -0
- package/dist/main/subgraph/queries/getIndexes.generated.js +5 -0
- package/dist/main/subgraph/queries/getIndexes.generated.js.map +1 -0
- package/dist/main/subgraph/queries/getStreams.generated.d.ts +1 -0
- package/dist/main/subgraph/queries/getStreams.generated.d.ts.map +1 -0
- package/dist/main/subgraph/queries/getStreams.generated.js +5 -0
- package/dist/main/subgraph/queries/getStreams.generated.js.map +1 -0
- package/dist/main/subgraph/queries/getTokens.generated.d.ts +1 -0
- package/dist/main/subgraph/queries/getTokens.generated.d.ts.map +1 -0
- package/dist/main/subgraph/queries/getTokens.generated.js +5 -0
- package/dist/main/subgraph/queries/getTokens.generated.js.map +1 -0
- package/dist/main/subgraph/schema.generated.d.ts +1 -0
- package/dist/main/subgraph/schema.generated.d.ts.map +1 -0
- package/dist/main/subgraph/schema.generated.js +3 -0
- package/dist/main/subgraph/schema.generated.js.map +1 -0
- package/dist/main/typechain/ERC20WithTokenInfo.d.ts +1 -0
- package/dist/main/typechain/ERC20WithTokenInfo.d.ts.map +1 -0
- package/dist/main/typechain/ERC20WithTokenInfo.js +3 -0
- package/dist/main/typechain/ERC20WithTokenInfo.js.map +1 -0
- package/dist/main/typechain/IConstantFlowAgreementV1.d.ts +1 -0
- package/dist/main/typechain/IConstantFlowAgreementV1.d.ts.map +1 -0
- package/dist/main/typechain/IConstantFlowAgreementV1.js +3 -0
- package/dist/main/typechain/IConstantFlowAgreementV1.js.map +1 -0
- package/dist/main/typechain/IInstantDistributionAgreementV1.d.ts +1 -0
- package/dist/main/typechain/IInstantDistributionAgreementV1.d.ts.map +1 -0
- package/dist/main/typechain/IInstantDistributionAgreementV1.js +3 -0
- package/dist/main/typechain/IInstantDistributionAgreementV1.js.map +1 -0
- package/dist/main/typechain/IResolver.d.ts +18 -3
- package/dist/main/typechain/IResolver.d.ts.map +1 -0
- package/dist/main/typechain/IResolver.js +3 -0
- package/dist/main/typechain/IResolver.js.map +1 -0
- package/dist/main/typechain/SuperToken.d.ts +1 -0
- package/dist/main/typechain/SuperToken.d.ts.map +1 -0
- package/dist/main/typechain/SuperToken.js +3 -0
- package/dist/main/typechain/SuperToken.js.map +1 -0
- package/dist/main/typechain/Superfluid.d.ts +1 -0
- package/dist/main/typechain/Superfluid.d.ts.map +1 -0
- package/dist/main/typechain/Superfluid.js +3 -0
- package/dist/main/typechain/Superfluid.js.map +1 -0
- package/dist/main/typechain/SuperfluidLoader.d.ts +1 -0
- package/dist/main/typechain/SuperfluidLoader.d.ts.map +1 -0
- package/dist/main/typechain/SuperfluidLoader.js +3 -0
- package/dist/main/typechain/SuperfluidLoader.js.map +1 -0
- package/dist/main/typechain/TestToken.d.ts +9 -0
- package/dist/main/typechain/TestToken.d.ts.map +1 -0
- package/dist/main/typechain/TestToken.js +3 -0
- package/dist/main/typechain/TestToken.js.map +1 -0
- package/dist/main/typechain/common.d.ts +1 -0
- package/dist/main/typechain/common.d.ts.map +1 -0
- package/dist/main/typechain/common.js +3 -0
- package/dist/main/typechain/common.js.map +1 -0
- package/dist/main/typechain/factories/ERC20WithTokenInfo__factory.d.ts +1 -0
- package/dist/main/typechain/factories/ERC20WithTokenInfo__factory.d.ts.map +1 -0
- package/dist/main/typechain/factories/ERC20WithTokenInfo__factory.js +242 -0
- package/dist/main/typechain/factories/ERC20WithTokenInfo__factory.js.map +1 -0
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.d.ts +1 -0
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.d.ts.map +1 -0
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.js +424 -0
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.js.map +1 -0
- package/dist/main/typechain/factories/IInstantDistributionAgreementV1__factory.d.ts +1 -0
- package/dist/main/typechain/factories/IInstantDistributionAgreementV1__factory.d.ts.map +1 -0
- package/dist/main/typechain/factories/IInstantDistributionAgreementV1__factory.js +965 -0
- package/dist/main/typechain/factories/IInstantDistributionAgreementV1__factory.js.map +1 -0
- package/dist/main/typechain/factories/IResolver__factory.d.ts +16 -2
- package/dist/main/typechain/factories/IResolver__factory.d.ts.map +1 -0
- package/dist/main/typechain/factories/IResolver__factory.js +76 -0
- package/dist/main/typechain/factories/IResolver__factory.js.map +1 -0
- package/dist/main/typechain/factories/SuperToken__factory.d.ts +1 -0
- package/dist/main/typechain/factories/SuperToken__factory.d.ts.map +1 -0
- package/dist/main/typechain/factories/SuperToken__factory.js +1567 -0
- package/dist/main/typechain/factories/SuperToken__factory.js.map +1 -0
- package/dist/main/typechain/factories/SuperfluidLoader__factory.d.ts +1 -0
- package/dist/main/typechain/factories/SuperfluidLoader__factory.d.ts.map +1 -0
- package/dist/main/typechain/factories/SuperfluidLoader__factory.js +72 -0
- package/dist/main/typechain/factories/SuperfluidLoader__factory.js.map +1 -0
- package/dist/main/typechain/factories/Superfluid__factory.d.ts +1 -0
- package/dist/main/typechain/factories/Superfluid__factory.d.ts.map +1 -0
- package/dist/main/typechain/factories/Superfluid__factory.js +1177 -0
- package/dist/main/typechain/factories/Superfluid__factory.js.map +1 -0
- package/dist/main/typechain/factories/TestToken__factory.d.ts +1 -0
- package/dist/main/typechain/factories/TestToken__factory.d.ts.map +1 -0
- package/dist/main/typechain/factories/TestToken__factory.js +348 -0
- package/dist/main/typechain/factories/TestToken__factory.js.map +1 -0
- package/dist/main/typechain/index.d.ts +1 -0
- package/dist/main/typechain/index.d.ts.map +1 -0
- package/dist/main/typechain/index.js +20 -0
- package/dist/main/typechain/index.js.map +1 -0
- package/dist/main/types.d.ts +1 -0
- package/dist/main/types.d.ts.map +1 -0
- package/dist/main/types.js +3 -0
- package/dist/main/types.js.map +1 -0
- package/dist/main/utils.d.ts +23 -0
- package/dist/main/utils.d.ts.map +1 -0
- package/dist/main/utils.js +178 -0
- package/dist/main/utils.js.map +1 -0
- package/dist/main/validation.d.ts +1 -0
- package/dist/main/validation.d.ts.map +1 -0
- package/dist/main/validation.js +98 -0
- package/dist/main/validation.js.map +1 -0
- package/dist/module/BatchCall.d.ts +2 -2
- package/dist/module/BatchCall.d.ts.map +1 -0
- package/dist/module/BatchCall.js +122 -0
- package/dist/module/BatchCall.js.map +1 -0
- package/dist/module/ConstantFlowAgreementV1.d.ts +7 -3
- package/dist/module/ConstantFlowAgreementV1.d.ts.map +1 -0
- package/dist/module/ConstantFlowAgreementV1.js +172 -0
- package/dist/module/ConstantFlowAgreementV1.js.map +1 -0
- package/dist/module/Framework.d.ts +7 -2
- package/dist/module/Framework.d.ts.map +1 -0
- package/dist/module/Framework.js +175 -0
- package/dist/module/Framework.js.map +1 -0
- package/dist/module/Host.d.ts +6 -1
- package/dist/module/Host.d.ts.map +1 -0
- package/dist/module/Host.js +25 -0
- package/dist/module/Host.js.map +1 -0
- package/dist/module/InstantDistributionAgreementV1.d.ts +18 -9
- package/dist/module/InstantDistributionAgreementV1.d.ts.map +1 -0
- package/dist/module/InstantDistributionAgreementV1.js +243 -0
- package/dist/module/InstantDistributionAgreementV1.js.map +1 -0
- package/dist/module/Operation.d.ts +1 -0
- package/dist/module/Operation.d.ts.map +1 -0
- package/dist/module/Operation.js +80 -0
- package/dist/module/Operation.js.map +1 -0
- package/dist/module/Query.d.ts +1 -0
- package/dist/module/Query.d.ts.map +1 -0
- package/dist/module/Query.js +305 -0
- package/dist/module/Query.js.map +1 -0
- package/dist/module/SFError.d.ts +3 -2
- package/dist/module/SFError.d.ts.map +1 -0
- package/dist/module/SFError.js +33 -0
- package/dist/module/SFError.js.map +1 -0
- package/dist/module/SuperToken.d.ts +34 -14
- package/dist/module/SuperToken.d.ts.map +1 -0
- package/dist/module/SuperToken.js +392 -0
- package/dist/module/SuperToken.js.map +1 -0
- package/dist/module/Token.d.ts +7 -3
- package/dist/module/Token.d.ts.map +1 -0
- package/dist/module/Token.js +160 -0
- package/dist/module/Token.js.map +1 -0
- package/dist/module/abi/ERC20WithTokenInfo.json +224 -0
- package/dist/module/abi/IConstantFlowAgreementV1.json +406 -0
- package/dist/module/abi/IInstantDistributionAgreementV1.json +947 -0
- package/dist/module/abi/IResolver.json +58 -0
- package/dist/module/abi/SuperToken.json +1549 -0
- package/dist/module/abi/Superfluid.json +1159 -0
- package/dist/module/abi/SuperfluidLoader.json +54 -0
- package/dist/module/constants.d.ts +10 -2
- package/dist/module/constants.d.ts.map +1 -0
- package/dist/module/constants.js +131 -0
- package/dist/module/constants.js.map +1 -0
- package/dist/module/events.d.ts +1 -0
- package/dist/module/events.d.ts.map +1 -0
- package/dist/module/events.js +2 -0
- package/dist/module/events.js.map +1 -0
- package/dist/module/frameworkHelpers.d.ts +1 -0
- package/dist/module/frameworkHelpers.d.ts.map +1 -0
- package/dist/module/frameworkHelpers.js +81 -0
- package/dist/module/frameworkHelpers.js.map +1 -0
- package/dist/module/index.d.ts +6 -0
- package/dist/module/index.d.ts.map +1 -0
- package/dist/module/index.js +25 -7490
- package/dist/module/index.js.map +1 -0
- package/dist/module/interfaces.d.ts +100 -11
- package/dist/module/interfaces.d.ts.map +1 -0
- package/dist/module/interfaces.js +2 -0
- package/dist/module/interfaces.js.map +1 -0
- package/dist/module/mapGetAllEventsQueryEvents.d.ts +1 -0
- package/dist/module/mapGetAllEventsQueryEvents.d.ts.map +1 -0
- package/dist/module/mapGetAllEventsQueryEvents.js +428 -0
- package/dist/module/mapGetAllEventsQueryEvents.js.map +1 -0
- package/dist/module/ordering.d.ts +1 -0
- package/dist/module/ordering.d.ts.map +1 -0
- package/dist/module/ordering.js +2 -0
- package/dist/module/ordering.js.map +1 -0
- package/dist/module/pagination.d.ts +1 -0
- package/dist/module/pagination.d.ts.map +1 -0
- package/dist/module/pagination.js +51 -0
- package/dist/module/pagination.js.map +1 -0
- package/dist/module/subgraph/SubgraphClient.d.ts +1 -0
- package/dist/module/subgraph/SubgraphClient.d.ts.map +1 -0
- package/dist/module/subgraph/SubgraphClient.js +44 -0
- package/dist/module/subgraph/SubgraphClient.js.map +1 -0
- package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.d.ts +1 -0
- package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.d.ts.map +1 -0
- package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.js +2 -0
- package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.js.map +1 -0
- package/dist/module/subgraph/queries/getAllEvents.generated.d.ts +1 -0
- package/dist/module/subgraph/queries/getAllEvents.generated.d.ts.map +1 -0
- package/dist/module/subgraph/queries/getAllEvents.generated.js +3 -0
- package/dist/module/subgraph/queries/getAllEvents.generated.js.map +1 -0
- package/dist/module/subgraph/queries/getIndexSubscriptions.generated.d.ts +1 -0
- package/dist/module/subgraph/queries/getIndexSubscriptions.generated.d.ts.map +1 -0
- package/dist/module/subgraph/queries/getIndexSubscriptions.generated.js +2 -0
- package/dist/module/subgraph/queries/getIndexSubscriptions.generated.js.map +1 -0
- package/dist/module/subgraph/queries/getIndexes.generated.d.ts +1 -0
- package/dist/module/subgraph/queries/getIndexes.generated.d.ts.map +1 -0
- package/dist/module/subgraph/queries/getIndexes.generated.js +2 -0
- package/dist/module/subgraph/queries/getIndexes.generated.js.map +1 -0
- package/dist/module/subgraph/queries/getStreams.generated.d.ts +1 -0
- package/dist/module/subgraph/queries/getStreams.generated.d.ts.map +1 -0
- package/dist/module/subgraph/queries/getStreams.generated.js +2 -0
- package/dist/module/subgraph/queries/getStreams.generated.js.map +1 -0
- package/dist/module/subgraph/queries/getTokens.generated.d.ts +1 -0
- package/dist/module/subgraph/queries/getTokens.generated.d.ts.map +1 -0
- package/dist/module/subgraph/queries/getTokens.generated.js +2 -0
- package/dist/module/subgraph/queries/getTokens.generated.js.map +1 -0
- package/dist/module/subgraph/schema.generated.d.ts +1 -0
- package/dist/module/subgraph/schema.generated.d.ts.map +1 -0
- package/dist/module/subgraph/schema.generated.js +2 -0
- package/dist/module/subgraph/schema.generated.js.map +1 -0
- package/dist/module/typechain/ERC20WithTokenInfo.d.ts +1 -0
- package/dist/module/typechain/ERC20WithTokenInfo.d.ts.map +1 -0
- package/dist/module/typechain/ERC20WithTokenInfo.js +2 -0
- package/dist/module/typechain/ERC20WithTokenInfo.js.map +1 -0
- package/dist/module/typechain/IConstantFlowAgreementV1.d.ts +1 -0
- package/dist/module/typechain/IConstantFlowAgreementV1.d.ts.map +1 -0
- package/dist/module/typechain/IConstantFlowAgreementV1.js +2 -0
- package/dist/module/typechain/IConstantFlowAgreementV1.js.map +1 -0
- package/dist/module/typechain/IInstantDistributionAgreementV1.d.ts +1 -0
- package/dist/module/typechain/IInstantDistributionAgreementV1.d.ts.map +1 -0
- package/dist/module/typechain/IInstantDistributionAgreementV1.js +2 -0
- package/dist/module/typechain/IInstantDistributionAgreementV1.js.map +1 -0
- package/dist/module/typechain/IResolver.d.ts +18 -3
- package/dist/module/typechain/IResolver.d.ts.map +1 -0
- package/dist/module/typechain/IResolver.js +2 -0
- package/dist/module/typechain/IResolver.js.map +1 -0
- package/dist/module/typechain/SuperToken.d.ts +1 -0
- package/dist/module/typechain/SuperToken.d.ts.map +1 -0
- package/dist/module/typechain/SuperToken.js +2 -0
- package/dist/module/typechain/SuperToken.js.map +1 -0
- package/dist/module/typechain/Superfluid.d.ts +1 -0
- package/dist/module/typechain/Superfluid.d.ts.map +1 -0
- package/dist/module/typechain/Superfluid.js +2 -0
- package/dist/module/typechain/Superfluid.js.map +1 -0
- package/dist/module/typechain/SuperfluidLoader.d.ts +1 -0
- package/dist/module/typechain/SuperfluidLoader.d.ts.map +1 -0
- package/dist/module/typechain/SuperfluidLoader.js +2 -0
- package/dist/module/typechain/SuperfluidLoader.js.map +1 -0
- package/dist/module/typechain/TestToken.d.ts +9 -0
- package/dist/module/typechain/TestToken.d.ts.map +1 -0
- package/dist/module/typechain/TestToken.js +2 -0
- package/dist/module/typechain/TestToken.js.map +1 -0
- package/dist/module/typechain/common.d.ts +1 -0
- package/dist/module/typechain/common.d.ts.map +1 -0
- package/dist/module/typechain/common.js +2 -0
- package/dist/module/typechain/common.js.map +1 -0
- package/dist/module/typechain/factories/ERC20WithTokenInfo__factory.d.ts +1 -0
- package/dist/module/typechain/factories/ERC20WithTokenInfo__factory.d.ts.map +1 -0
- package/dist/module/typechain/factories/ERC20WithTokenInfo__factory.js +238 -0
- package/dist/module/typechain/factories/ERC20WithTokenInfo__factory.js.map +1 -0
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.d.ts +1 -0
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.d.ts.map +1 -0
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.js +420 -0
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.js.map +1 -0
- package/dist/module/typechain/factories/IInstantDistributionAgreementV1__factory.d.ts +1 -0
- package/dist/module/typechain/factories/IInstantDistributionAgreementV1__factory.d.ts.map +1 -0
- package/dist/module/typechain/factories/IInstantDistributionAgreementV1__factory.js +961 -0
- package/dist/module/typechain/factories/IInstantDistributionAgreementV1__factory.js.map +1 -0
- package/dist/module/typechain/factories/IResolver__factory.d.ts +16 -2
- package/dist/module/typechain/factories/IResolver__factory.d.ts.map +1 -0
- package/dist/module/typechain/factories/IResolver__factory.js +72 -0
- package/dist/module/typechain/factories/IResolver__factory.js.map +1 -0
- package/dist/module/typechain/factories/SuperToken__factory.d.ts +1 -0
- package/dist/module/typechain/factories/SuperToken__factory.d.ts.map +1 -0
- package/dist/module/typechain/factories/SuperToken__factory.js +1563 -0
- package/dist/module/typechain/factories/SuperToken__factory.js.map +1 -0
- package/dist/module/typechain/factories/SuperfluidLoader__factory.d.ts +1 -0
- package/dist/module/typechain/factories/SuperfluidLoader__factory.d.ts.map +1 -0
- package/dist/module/typechain/factories/SuperfluidLoader__factory.js +68 -0
- package/dist/module/typechain/factories/SuperfluidLoader__factory.js.map +1 -0
- package/dist/module/typechain/factories/Superfluid__factory.d.ts +1 -0
- package/dist/module/typechain/factories/Superfluid__factory.d.ts.map +1 -0
- package/dist/module/typechain/factories/Superfluid__factory.js +1173 -0
- package/dist/module/typechain/factories/Superfluid__factory.js.map +1 -0
- package/dist/module/typechain/factories/TestToken__factory.d.ts +1 -0
- package/dist/module/typechain/factories/TestToken__factory.d.ts.map +1 -0
- package/dist/module/typechain/factories/TestToken__factory.js +344 -0
- package/dist/module/typechain/factories/TestToken__factory.js.map +1 -0
- package/dist/module/typechain/index.d.ts +1 -0
- package/dist/module/typechain/index.d.ts.map +1 -0
- package/dist/{umd/typechain/index.d.ts → module/typechain/index.js} +1 -8
- package/dist/module/typechain/index.js.map +1 -0
- package/dist/module/types.d.ts +1 -0
- package/dist/module/types.d.ts.map +1 -0
- package/dist/module/types.js +2 -0
- package/dist/module/types.js.map +1 -0
- package/dist/module/utils.d.ts +23 -0
- package/dist/module/utils.d.ts.map +1 -0
- package/dist/module/utils.js +153 -0
- package/dist/module/utils.js.map +1 -0
- package/dist/module/validation.d.ts +1 -0
- package/dist/module/validation.d.ts.map +1 -0
- package/dist/module/validation.js +92 -0
- package/dist/module/validation.js.map +1 -0
- package/package.json +48 -34
- package/dist/umd/BatchCall.d.ts +0 -53
- package/dist/umd/ConstantFlowAgreementV1.d.ts +0 -74
- package/dist/umd/Framework.d.ts +0 -75
- package/dist/umd/Host.d.ts +0 -18
- package/dist/umd/InstantDistributionAgreementV1.d.ts +0 -107
- package/dist/umd/Operation.d.ts +0 -38
- package/dist/umd/Query.d.ts +0 -31
- package/dist/umd/SFError.d.ts +0 -13
- package/dist/umd/SuperToken.d.ts +0 -191
- package/dist/umd/Token.d.ts +0 -76
- package/dist/umd/constants.d.ts +0 -10
- package/dist/umd/events.d.ts +0 -255
- package/dist/umd/frameworkHelpers.d.ts +0 -20
- package/dist/umd/index.d.ts +0 -19
- package/dist/umd/index.js +0 -7526
- package/dist/umd/interfaces.d.ts +0 -304
- package/dist/umd/mapGetAllEventsQueryEvents.d.ts +0 -3
- package/dist/umd/ordering.d.ts +0 -13
- package/dist/umd/pagination.d.ts +0 -65
- package/dist/umd/subgraph/SubgraphClient.d.ts +0 -16
- package/dist/umd/subgraph/queries/getAccountTokenSnapshots.generated.d.ts +0 -45
- package/dist/umd/subgraph/queries/getAllEvents.generated.d.ts +0 -651
- package/dist/umd/subgraph/queries/getIndexSubscriptions.generated.d.ts +0 -46
- package/dist/umd/subgraph/queries/getIndexes.generated.d.ts +0 -44
- package/dist/umd/subgraph/queries/getStreams.generated.d.ts +0 -58
- package/dist/umd/subgraph/queries/getTokens.generated.d.ts +0 -27
- package/dist/umd/subgraph/schema.generated.d.ts +0 -6478
- package/dist/umd/typechain/ERC20WithTokenInfo.d.ts +0 -159
- package/dist/umd/typechain/IConstantFlowAgreementV1.d.ts +0 -305
- package/dist/umd/typechain/IInstantDistributionAgreementV1.d.ts +0 -585
- package/dist/umd/typechain/IResolver.d.ts +0 -57
- package/dist/umd/typechain/SuperToken.d.ts +0 -1011
- package/dist/umd/typechain/Superfluid.d.ts +0 -780
- package/dist/umd/typechain/SuperfluidLoader.d.ts +0 -55
- package/dist/umd/typechain/TestToken.d.ts +0 -207
- package/dist/umd/typechain/common.d.ts +0 -21
- package/dist/umd/typechain/factories/ERC20WithTokenInfo__factory.d.ts +0 -35
- package/dist/umd/typechain/factories/IConstantFlowAgreementV1__factory.d.ts +0 -35
- package/dist/umd/typechain/factories/IInstantDistributionAgreementV1__factory.d.ts +0 -35
- package/dist/umd/typechain/factories/IResolver__factory.d.ts +0 -22
- package/dist/umd/typechain/factories/SuperToken__factory.d.ts +0 -46
- package/dist/umd/typechain/factories/SuperfluidLoader__factory.d.ts +0 -37
- package/dist/umd/typechain/factories/Superfluid__factory.d.ts +0 -82
- package/dist/umd/typechain/factories/TestToken__factory.d.ts +0 -46
- package/dist/umd/types.d.ts +0 -2
- package/dist/umd/utils.d.ts +0 -89
- package/dist/umd/validation.d.ts +0 -8
|
@@ -6,3 +6,4 @@ export declare const validateIndexRequest: (filter: IIndexRequestFilter) => void
|
|
|
6
6
|
export declare const validateIndexSubscriptionRequest: (filter: IIndexSubscriptionRequestFilter) => void;
|
|
7
7
|
export declare const validateStreamRequest: (filter: IStreamRequestFilter) => void;
|
|
8
8
|
export declare const validateAccountTokenSnapshotRequest: (filter: IAccountTokenSnapshotFilter) => void;
|
|
9
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../src/validation.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,2BAA2B,EAC3B,mBAAmB,EACnB,+BAA+B,EAC/B,oBAAoB,EACpB,wBAAwB,EAC3B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AA+FjC,eAAO,MAAM,yBAAyB,4CAErC,CAAC;AACF,eAAO,MAAM,oBAAoB,gCAEhC,CAAC;AACF,eAAO,MAAM,oBAAoB,uCAEhC,CAAC;AACF,eAAO,MAAM,gCAAgC,mDAE5C,CAAC;AACF,eAAO,MAAM,qBAAqB,wCAEjC,CAAC;AACF,eAAO,MAAM,mCAAmC,+CAK3C,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import Ajv from "ajv";
|
|
2
|
+
import { ethers } from "ethers";
|
|
3
|
+
import SFError from "./SFError";
|
|
4
|
+
const ajv = new Ajv();
|
|
5
|
+
ajv.addFormat("addressOrEmpty", {
|
|
6
|
+
type: "string",
|
|
7
|
+
validate: (x) => x === "" || ethers.utils.isAddress(x),
|
|
8
|
+
});
|
|
9
|
+
ajv.addFormat("stringNumber", {
|
|
10
|
+
type: "string",
|
|
11
|
+
validate: (x) => !isNaN(Number(x)),
|
|
12
|
+
});
|
|
13
|
+
// Schemas
|
|
14
|
+
const superTokenRequestSchema = {
|
|
15
|
+
type: "object",
|
|
16
|
+
additionalProperties: false,
|
|
17
|
+
properties: {
|
|
18
|
+
isListed: { type: "boolean", nullable: true },
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
const eventRequestSchema = {
|
|
22
|
+
type: "object",
|
|
23
|
+
additionalProperties: false,
|
|
24
|
+
properties: {
|
|
25
|
+
account: { type: "string", format: "addressOrEmpty", nullable: true },
|
|
26
|
+
timestamp_gt: {
|
|
27
|
+
type: "number",
|
|
28
|
+
nullable: true,
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
const indexRequestSchema = {
|
|
33
|
+
type: "object",
|
|
34
|
+
additionalProperties: false,
|
|
35
|
+
properties: {
|
|
36
|
+
indexId: { type: "string", format: "stringNumber", nullable: true },
|
|
37
|
+
publisher: { type: "string", format: "addressOrEmpty", nullable: true },
|
|
38
|
+
token: { type: "string", format: "addressOrEmpty", nullable: true },
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
const accountTokenSnapshotRequestSchema = {
|
|
42
|
+
type: "object",
|
|
43
|
+
additionalProperties: false,
|
|
44
|
+
properties: {
|
|
45
|
+
account: {
|
|
46
|
+
type: "string",
|
|
47
|
+
format: "addressOrEmpty",
|
|
48
|
+
nullable: true,
|
|
49
|
+
},
|
|
50
|
+
token: { type: "string", format: "addressOrEmpty", nullable: true },
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
const indexSubscriptionRequestSchema = {
|
|
54
|
+
type: "object",
|
|
55
|
+
additionalProperties: false,
|
|
56
|
+
properties: {
|
|
57
|
+
subscriber: {
|
|
58
|
+
type: "string",
|
|
59
|
+
format: "stringNumber",
|
|
60
|
+
nullable: true,
|
|
61
|
+
},
|
|
62
|
+
approved: { type: "boolean", nullable: true },
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
const streamRequestSchema = {
|
|
66
|
+
type: "object",
|
|
67
|
+
additionalProperties: false,
|
|
68
|
+
properties: {
|
|
69
|
+
sender: { type: "string", format: "addressOrEmpty", nullable: true },
|
|
70
|
+
receiver: { type: "string", format: "addressOrEmpty", nullable: true },
|
|
71
|
+
token: { type: "string", format: "addressOrEmpty", nullable: true },
|
|
72
|
+
},
|
|
73
|
+
};
|
|
74
|
+
function wrapValidationWithCustomError(validateFunction) {
|
|
75
|
+
return (filter) => {
|
|
76
|
+
if (!validateFunction(filter)) {
|
|
77
|
+
throw new SFError({
|
|
78
|
+
type: "INVALID_OBJECT",
|
|
79
|
+
customMessage: "Invalid Filter Object",
|
|
80
|
+
errorObject: validateFunction.errors,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
// Validate functions
|
|
86
|
+
export const validateSuperTokenRequest = wrapValidationWithCustomError(ajv.compile(superTokenRequestSchema));
|
|
87
|
+
export const validateEventRequest = wrapValidationWithCustomError(ajv.compile(eventRequestSchema));
|
|
88
|
+
export const validateIndexRequest = wrapValidationWithCustomError(ajv.compile(indexRequestSchema));
|
|
89
|
+
export const validateIndexSubscriptionRequest = wrapValidationWithCustomError(ajv.compile(indexSubscriptionRequestSchema));
|
|
90
|
+
export const validateStreamRequest = wrapValidationWithCustomError(ajv.compile(streamRequestSchema));
|
|
91
|
+
export const validateAccountTokenSnapshotRequest = wrapValidationWithCustomError(ajv.compile(accountTokenSnapshotRequestSchema));
|
|
92
|
+
//# sourceMappingURL=validation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/validation.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,31 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@superfluid-finance/sdk-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.1-dev.64549c3.0",
|
|
4
4
|
"description": "SDK Core for building with Superfluid Protocol",
|
|
5
5
|
"homepage": "https://github.com/superfluid-finance/protocol-monorepo/tree/dev/packages/sdk-core#readme",
|
|
6
6
|
"repository": "github:superfluid-finance/protocol-monorepo",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"main": "dist/main/index.js",
|
|
9
9
|
"module": "dist/module/index.js",
|
|
10
|
-
"types": "dist/
|
|
10
|
+
"types": "dist/module/index.d.ts",
|
|
11
11
|
"files": [
|
|
12
|
-
"dist
|
|
13
|
-
"dist
|
|
12
|
+
"dist/main",
|
|
13
|
+
"dist/module",
|
|
14
|
+
"dist/index.umd.js",
|
|
15
|
+
"CHANGELOG.md",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"README.md"
|
|
14
18
|
],
|
|
15
19
|
"scripts": {
|
|
16
|
-
"build": "yarn generate-abi-files && yarn generate-web3-types && yarn generate-graphql-types && rm -rf dist &&
|
|
20
|
+
"build": "yarn generate-abi-files && yarn generate-web3-types && yarn generate-graphql-types && rm -rf dist && run-p build:*",
|
|
21
|
+
"build:main": "tsc -p tsconfig.json",
|
|
22
|
+
"build:module": "tsc -p tsconfig.module.json",
|
|
23
|
+
"build:umd": "mkdir -p dist && browserify src/index.ts -s sdkCore -p [ tsify --noImplicitAny ] > dist/index.umd.js",
|
|
17
24
|
"testenv:start": "tasks/testenv-ctl.sh start",
|
|
18
25
|
"testenv:stop": "tasks/testenv-ctl.sh stop",
|
|
19
26
|
"pretest": "yarn testenv:start",
|
|
20
|
-
"test": "
|
|
27
|
+
"test": "nyc --reporter=html --reporter=lcov --reporter=json npx hardhat test --network localhost --tsconfig \"tsconfig.test.json\"",
|
|
21
28
|
"posttest": "yarn testenv:stop",
|
|
22
29
|
"check-updates": "ncu --target minor --dep prod,dev",
|
|
23
|
-
"doc:html": "typedoc --out
|
|
30
|
+
"doc:html": "typedoc --out dist/docs --entryPoints ./src/index.ts",
|
|
24
31
|
"lint": "run-s lint:*",
|
|
25
|
-
"lint:prettier": "prettier \"src/**/*.ts\" --
|
|
26
|
-
"lint:
|
|
27
|
-
"
|
|
28
|
-
"
|
|
32
|
+
"lint:prettier": "prettier \"src/**/*.ts\" --list-different",
|
|
33
|
+
"lint:eslint": "eslint src --ext .ts",
|
|
34
|
+
"fix": "run-s fix:*",
|
|
35
|
+
"fix:prettier": "yarn lint:prettier --write",
|
|
36
|
+
"fix:eslint": "yarn lint:eslint --fix",
|
|
37
|
+
"pre-commit": "run-s lint:*",
|
|
29
38
|
"generate-abi-files": "rm -rf src/abi && mkdir src/abi && tasks/build-abi-json.sh",
|
|
30
39
|
"generate-web3-types": "typechain --target=ethers-v5 --out-dir=./src/typechain \"./src/abi/**/*.json\"",
|
|
31
40
|
"generate-graphql-types": "graphql-codegen --config subgraph-codegen.yml"
|
|
@@ -34,49 +43,54 @@
|
|
|
34
43
|
"url": "https://github.com/superfluid-finance/protocol-monorepo/issues"
|
|
35
44
|
},
|
|
36
45
|
"dependencies": {
|
|
37
|
-
"@ethersproject/providers": "^5.5.
|
|
46
|
+
"@ethersproject/providers": "^5.5.1",
|
|
38
47
|
"ajv": "^8.8.2",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
48
|
+
"browserify": "^17.0.0",
|
|
49
|
+
"ethers": "^5.5.2",
|
|
50
|
+
"graphql-request": "^3.7.0",
|
|
51
|
+
"tsify": "^5.0.4"
|
|
41
52
|
},
|
|
42
53
|
"devDependencies": {
|
|
43
|
-
"@graphql-codegen/cli": "2.3.
|
|
44
|
-
"@graphql-codegen/introspection": "2.1.
|
|
45
|
-
"@graphql-codegen/near-operation-file-preset": "^2.2.
|
|
46
|
-
"@graphql-codegen/typed-document-node": "^2.2.
|
|
47
|
-
"@graphql-codegen/typescript": "2.4.
|
|
48
|
-
"@graphql-codegen/typescript-operations": "2.2.
|
|
49
|
-
"@nomiclabs/hardhat-ethers": "^2.0.
|
|
54
|
+
"@graphql-codegen/cli": "2.3.1",
|
|
55
|
+
"@graphql-codegen/introspection": "2.1.1",
|
|
56
|
+
"@graphql-codegen/near-operation-file-preset": "^2.2.3",
|
|
57
|
+
"@graphql-codegen/typed-document-node": "^2.2.2",
|
|
58
|
+
"@graphql-codegen/typescript": "2.4.2",
|
|
59
|
+
"@graphql-codegen/typescript-operations": "2.2.2",
|
|
60
|
+
"@nomiclabs/hardhat-ethers": "^2.0.3",
|
|
50
61
|
"@nomiclabs/hardhat-waffle": "^2.0.1",
|
|
51
62
|
"@nomiclabs/hardhat-web3": "^2.0.0",
|
|
52
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
53
|
-
"@rollup/plugin-typescript": "^8.3.0",
|
|
54
63
|
"@typechain/ethers-v5": "^8.0.5",
|
|
55
|
-
"@typechain/hardhat": "^3.
|
|
56
|
-
"@types/chai": "^4.
|
|
64
|
+
"@typechain/hardhat": "^3.1.0",
|
|
65
|
+
"@types/chai": "^4.3.0",
|
|
57
66
|
"@types/mocha": "^9.0.0",
|
|
58
|
-
"@types/node": "^
|
|
59
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
60
|
-
"@typescript-eslint/parser": "^5.
|
|
67
|
+
"@types/node": "^17.0.7",
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^5.8.1",
|
|
69
|
+
"@typescript-eslint/parser": "^5.8.1",
|
|
61
70
|
"chai": "^4.3.4",
|
|
62
71
|
"chai-ethers": "^0.0.1",
|
|
63
72
|
"coveralls": "^3.1.1",
|
|
64
73
|
"dotenv": "^10.0.0",
|
|
65
|
-
"eslint": "^8.
|
|
74
|
+
"eslint": "^8.6.0",
|
|
66
75
|
"eslint-config-prettier": "^8.3.0",
|
|
67
76
|
"eslint-plugin-eslint-comments": "^3.2.0",
|
|
68
|
-
"eslint-plugin-import": "^2.25.
|
|
77
|
+
"eslint-plugin-import": "^2.25.4",
|
|
69
78
|
"ethereum-waffle": "^3.4.0",
|
|
70
|
-
"hardhat": "^2.
|
|
79
|
+
"hardhat": "^2.8.0",
|
|
71
80
|
"mocha": "^9.1.3",
|
|
81
|
+
"npm-run-all": "^4.1.5",
|
|
72
82
|
"nyc": "^15.1.0",
|
|
73
|
-
"rollup": "^2.
|
|
83
|
+
"rollup": "^2.62.0",
|
|
74
84
|
"ts-node": "^10.4.0",
|
|
75
|
-
"typechain": "^6.0
|
|
85
|
+
"typechain": "^6.1.0",
|
|
76
86
|
"typedoc": "^0.22.10",
|
|
77
|
-
"typescript": "^4.5.
|
|
87
|
+
"typescript": "^4.5.4",
|
|
88
|
+
"web3": "^1.6.1"
|
|
78
89
|
},
|
|
79
90
|
"resolutions": {
|
|
80
91
|
"graphql": "^16.0.0"
|
|
92
|
+
},
|
|
93
|
+
"engines": {
|
|
94
|
+
"node": ">=12"
|
|
81
95
|
}
|
|
82
96
|
}
|
package/dist/umd/BatchCall.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { ethers } from "ethers";
|
|
2
|
-
import Host from "./Host";
|
|
3
|
-
import Operation from "./Operation";
|
|
4
|
-
import { IConfig } from "./interfaces";
|
|
5
|
-
interface IBatchCallOptions {
|
|
6
|
-
config: IConfig;
|
|
7
|
-
operations: ReadonlyArray<Operation>;
|
|
8
|
-
}
|
|
9
|
-
interface OperationStruct {
|
|
10
|
-
readonly operationType: number;
|
|
11
|
-
readonly target: string;
|
|
12
|
-
readonly data: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* @dev BatchCall Helper Class
|
|
16
|
-
* @description A helper class to create `BatchCall` objects which can be executed.
|
|
17
|
-
*/
|
|
18
|
-
export default class BatchCall {
|
|
19
|
-
options: IBatchCallOptions;
|
|
20
|
-
host: Host;
|
|
21
|
-
constructor(options: IBatchCallOptions);
|
|
22
|
-
/**
|
|
23
|
-
* @dev Gets the call agreement function arguments.
|
|
24
|
-
* @param callData callData of the function
|
|
25
|
-
* @returns {ethers.utils.Result} call agreement function arguments
|
|
26
|
-
*/
|
|
27
|
-
getCallAgreementFunctionArgs: (callData: string) => ethers.utils.Result;
|
|
28
|
-
/**
|
|
29
|
-
* @dev Given an `Operation` object, gets the `OperationStruct` object.
|
|
30
|
-
* @param operation an `Operation` object
|
|
31
|
-
* @param index the index of the `Operation` in the batchCall
|
|
32
|
-
* @returns {Promise<OperationStruct>} OperationStruct object for batchCall
|
|
33
|
-
*/
|
|
34
|
-
getOperationStruct: (operation: Operation, index: number) => Promise<OperationStruct>;
|
|
35
|
-
/**
|
|
36
|
-
* @dev Gets an array of `OperationStruct` objects to be passed to batchCall.
|
|
37
|
-
* @returns {Promise<OperationStruct>[]} array of operation struct promises
|
|
38
|
-
*/
|
|
39
|
-
get getOperationStructArrayPromises(): Promise<OperationStruct>[];
|
|
40
|
-
/**
|
|
41
|
-
* @dev Executes a batch call given the operations on this class.
|
|
42
|
-
* @param signer the signer of the transaction
|
|
43
|
-
* @returns {Promise<ethers.ContractTransaction>} ContractTransaction object
|
|
44
|
-
*/
|
|
45
|
-
exec: (signer: ethers.Signer) => Promise<ethers.ContractTransaction>;
|
|
46
|
-
/**
|
|
47
|
-
* @dev Executes a forward batch call given the operations on this class.
|
|
48
|
-
* @param signer the signer of the transaction
|
|
49
|
-
* @returns {Promise<ethers.ContractTransaction>} ContractTransaction object
|
|
50
|
-
*/
|
|
51
|
-
execForward: (signer: ethers.Signer) => Promise<ethers.ContractTransaction>;
|
|
52
|
-
}
|
|
53
|
-
export {};
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import Host from "./Host";
|
|
2
|
-
import Operation from "./Operation";
|
|
3
|
-
import { IAgreementV1Options, ICreateFlowParams, IDeleteFlowParams, IGetAccountFlowInfoParams, IGetFlowParams, IUpdateFlowParams, IWeb3FlowInfo, IWeb3FlowInfoParams } from "./interfaces";
|
|
4
|
-
/**
|
|
5
|
-
* @dev Constant Flow Agreement V1 Helper Class
|
|
6
|
-
* @description A helper class to interact with the CFAV1 contract.
|
|
7
|
-
*/
|
|
8
|
-
export default class ConstantFlowAgreementV1 {
|
|
9
|
-
readonly options: IAgreementV1Options;
|
|
10
|
-
readonly host: Host;
|
|
11
|
-
constructor(options: IAgreementV1Options);
|
|
12
|
-
private get cfaContract();
|
|
13
|
-
/**
|
|
14
|
-
* @dev Get the details of a flow.
|
|
15
|
-
* @param superToken the superToken of the agreement
|
|
16
|
-
* @param sender the sender of the flow
|
|
17
|
-
* @param receiver the receiver of the flow
|
|
18
|
-
* @param providerOrSigner a provider or signer object
|
|
19
|
-
* @returns {Promise<IWeb3FlowInfo>} Web3 Flow info object
|
|
20
|
-
*/
|
|
21
|
-
getFlow: ({ superToken, sender, receiver, providerOrSigner, }: IGetFlowParams) => Promise<IWeb3FlowInfo>;
|
|
22
|
-
/**
|
|
23
|
-
* @dev Get the flow info of an account (net flow).
|
|
24
|
-
* @param superToken the superToken of the agreement
|
|
25
|
-
* @param account the account we're querying
|
|
26
|
-
* @param providerOrSigner a provider or signer object
|
|
27
|
-
* @returns {Promise<IWeb3FlowInfo>} Web3 Flow info object
|
|
28
|
-
*/
|
|
29
|
-
getAccountFlowInfo: ({ superToken, account, providerOrSigner, }: IGetAccountFlowInfoParams) => Promise<IWeb3FlowInfo>;
|
|
30
|
-
/**
|
|
31
|
-
* @dev Get the net flow of an account.
|
|
32
|
-
* @param superToken the superToken of the agreement
|
|
33
|
-
* @param account the account we're querying
|
|
34
|
-
* @param providerOrSigner a provider or signer object
|
|
35
|
-
* @returns {Promise<string>} Web3 Flow info object
|
|
36
|
-
*/
|
|
37
|
-
getNetFlow: ({ superToken, account, providerOrSigner, }: IGetAccountFlowInfoParams) => Promise<string>;
|
|
38
|
-
/**
|
|
39
|
-
* @dev Create a flow.
|
|
40
|
-
* @param flowRate The specified flow rate.
|
|
41
|
-
* @param receiver The receiver of the flow.
|
|
42
|
-
* @param superToken The token to be flowed.
|
|
43
|
-
* @param userData Extra user data provided.
|
|
44
|
-
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
45
|
-
*/
|
|
46
|
-
createFlow: ({ flowRate, receiver, superToken, userData, }: ICreateFlowParams) => Operation;
|
|
47
|
-
/**
|
|
48
|
-
* @dev Update a flow.
|
|
49
|
-
* @param flowRate The specified flow rate.
|
|
50
|
-
* @param receiver The receiver of the flow.
|
|
51
|
-
* @param superToken The token to be flowed.
|
|
52
|
-
* @param userData Extra user data provided.
|
|
53
|
-
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
54
|
-
*/
|
|
55
|
-
updateFlow: ({ flowRate, receiver, superToken, userData, }: IUpdateFlowParams) => Operation;
|
|
56
|
-
/**
|
|
57
|
-
* @dev Delete a flow.
|
|
58
|
-
* @param superToken The token to be flowed.
|
|
59
|
-
* @param sender The sender of the flow.
|
|
60
|
-
* @param receiver The receiver of the flow.
|
|
61
|
-
* @param userData Extra user data provided.
|
|
62
|
-
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
63
|
-
*/
|
|
64
|
-
deleteFlow: ({ superToken, sender, receiver, userData, }: IDeleteFlowParams) => Operation;
|
|
65
|
-
/**
|
|
66
|
-
* @dev Sanitizes flow info, converting BigNumber to string.
|
|
67
|
-
* @param timestamp last updated timestamp of flow
|
|
68
|
-
* @param flowRate the current flow rate
|
|
69
|
-
* @param deposit the deposit amount
|
|
70
|
-
* @param owedDeposit any owed depsit
|
|
71
|
-
* @returns {IWeb3FlowInfo} sanitized web3 flow info
|
|
72
|
-
*/
|
|
73
|
-
_sanitizeflowInfo: ({ timestamp, flowRate, deposit, owedDeposit, }: IWeb3FlowInfoParams) => IWeb3FlowInfo;
|
|
74
|
-
}
|
package/dist/umd/Framework.d.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { Signer } from "@ethersproject/abstract-signer";
|
|
2
|
-
import { ethers } from "ethers";
|
|
3
|
-
import BatchCall from "./BatchCall";
|
|
4
|
-
import ConstantFlowAgreementV1 from "./ConstantFlowAgreementV1";
|
|
5
|
-
import Host from "./Host";
|
|
6
|
-
import InstantDistributionAgreementV1 from "./InstantDistributionAgreementV1";
|
|
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
|
-
export interface IFrameworkOptions {
|
|
13
|
-
chainId?: number;
|
|
14
|
-
customSubgraphQueriesEndpoint?: string;
|
|
15
|
-
dataMode?: DataMode;
|
|
16
|
-
networkName?: string;
|
|
17
|
-
resolverAddress?: string;
|
|
18
|
-
protocolReleaseVersion?: string;
|
|
19
|
-
provider: ethers.providers.Provider;
|
|
20
|
-
}
|
|
21
|
-
export interface IFrameworkSettings {
|
|
22
|
-
chainId: number;
|
|
23
|
-
customSubgraphQueriesEndpoint: string;
|
|
24
|
-
dataMode: DataMode;
|
|
25
|
-
networkName: string;
|
|
26
|
-
protocolReleaseVersion: string;
|
|
27
|
-
provider: ethers.providers.Provider;
|
|
28
|
-
config: IConfig;
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* @dev Superfluid Framework Class
|
|
32
|
-
* @description The entrypoint for the SDK-core, `create` an instance of this for full functionality.
|
|
33
|
-
*/
|
|
34
|
-
export default class Framework {
|
|
35
|
-
readonly userInputOptions: IFrameworkOptions;
|
|
36
|
-
settings: IFrameworkSettings;
|
|
37
|
-
cfaV1: ConstantFlowAgreementV1;
|
|
38
|
-
host: Host;
|
|
39
|
-
idaV1: InstantDistributionAgreementV1;
|
|
40
|
-
query: Query;
|
|
41
|
-
private constructor();
|
|
42
|
-
/**
|
|
43
|
-
* @dev Creates the Framework object based on user provided `options`.
|
|
44
|
-
* @param options.chainId the chainId of your desired network (e.g. 137 = matic)
|
|
45
|
-
* @param options.customSubgraphQueriesEndpoint your custom subgraph endpoint
|
|
46
|
-
* @param options.dataMode the data mode you'd like the framework to use (SUBGRAPH_ONLY, SUBGRAPH_WEB3, WEB3_ONLY)
|
|
47
|
-
* @param options.networkName the desired network (e.g. "matic", "rinkeby", etc.)
|
|
48
|
-
* @param options.resolverAddress a custom resolver address (advanced use for testing)
|
|
49
|
-
* @param options.protocolReleaseVersion a custom release version (advanced use for testing)
|
|
50
|
-
* @param options.provider a provider object necessary for initializing the framework
|
|
51
|
-
* @returns `Framework` class
|
|
52
|
-
*/
|
|
53
|
-
static create: (options: IFrameworkOptions) => Promise<Framework>;
|
|
54
|
-
/**
|
|
55
|
-
* @dev Create a signer which can be used to sign transactions.
|
|
56
|
-
* @param options.web3Provider a Web3Provider object (e.g. client side - metamask, web3modal)
|
|
57
|
-
* @param options.provider an ethers Provider object (e.g. via Hardhat ethers)
|
|
58
|
-
* @param options.privateKey a test account private key
|
|
59
|
-
* @param options.signer a signer object (e.g. ethers.Wallet instance)
|
|
60
|
-
* @returns `ethers.Signer` object
|
|
61
|
-
*/
|
|
62
|
-
createSigner: (options: ISignerConstructorOptions) => Signer;
|
|
63
|
-
/**
|
|
64
|
-
* @dev Create a `BatchCall` class from the `Framework`.
|
|
65
|
-
* @param operations the list of operations to execute
|
|
66
|
-
* @returns `BatchCall` class
|
|
67
|
-
*/
|
|
68
|
-
batchCall: (operations: Operation[]) => BatchCall;
|
|
69
|
-
/**
|
|
70
|
-
* @dev Load a `SuperToken` class from the `Framework`.
|
|
71
|
-
* @param address the `SuperToken` address
|
|
72
|
-
* @returns `SuperToken` class
|
|
73
|
-
*/
|
|
74
|
-
loadSuperToken: (address: string) => Promise<SuperToken>;
|
|
75
|
-
}
|
package/dist/umd/Host.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import Operation from "./Operation";
|
|
2
|
-
import { Superfluid } from "./typechain";
|
|
3
|
-
/**
|
|
4
|
-
* @dev Host Helper Class
|
|
5
|
-
* @description A helper class which can be used as a standalone class to populate call agreement transactions.
|
|
6
|
-
*/
|
|
7
|
-
export default class Host {
|
|
8
|
-
hostContract: Superfluid;
|
|
9
|
-
constructor(hostAddress: string);
|
|
10
|
-
/**
|
|
11
|
-
* @dev Creates an Operation of the `callAgreement` function on the host contract.
|
|
12
|
-
* @param agreementAddress the agreement address (cfa or ida address)
|
|
13
|
-
* @param callData the encoded callData for the function
|
|
14
|
-
* @param userData any additional user data
|
|
15
|
-
* @returns {Operation} an `Operation` class
|
|
16
|
-
*/
|
|
17
|
-
populateCallAgreementTxnAndReturnOperation: (agreementAddress: string, callData: string, userData: string | undefined) => Operation;
|
|
18
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
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
|
-
/**
|
|
5
|
-
* @dev Instant Distribution Agreement V1 Helper Class
|
|
6
|
-
* @description A helper class to interact with the IDAV1 contract.
|
|
7
|
-
*/
|
|
8
|
-
export default class InstantDistributionAgreementV1 {
|
|
9
|
-
readonly options: IAgreementV1Options;
|
|
10
|
-
readonly host: Host;
|
|
11
|
-
constructor(options: IAgreementV1Options);
|
|
12
|
-
private get idaContract();
|
|
13
|
-
/**
|
|
14
|
-
* @dev Get the details of a `Subscription`.
|
|
15
|
-
* @param superToken the superToken of the agreement
|
|
16
|
-
* @param publisher the address of the publisher of the index
|
|
17
|
-
* @param indexId the index id
|
|
18
|
-
* @param subscriber the subscriber's address
|
|
19
|
-
* @param providerOrSigner a provider or signer object
|
|
20
|
-
* @returns {Promise<IWeb3Subscription>} Web3 Subscription object
|
|
21
|
-
*/
|
|
22
|
-
getSubscription: ({ superToken, publisher, indexId, subscriber, providerOrSigner, }: IGetSubscriptionParams) => Promise<IWeb3Subscription>;
|
|
23
|
-
/**
|
|
24
|
-
* @dev Get the details of an `Index`.
|
|
25
|
-
* @param superToken the superToken of the agreement
|
|
26
|
-
* @param publisher the address of the publisher of the index
|
|
27
|
-
* @param indexId the index id
|
|
28
|
-
* @param providerOrSigner a provider or signer object
|
|
29
|
-
* @returns {Promise<IWeb3Index>} Web3 Index object
|
|
30
|
-
*/
|
|
31
|
-
getIndex: ({ superToken, publisher, indexId, providerOrSigner, }: IGetIndexParams) => Promise<IWeb3Index>;
|
|
32
|
-
/**
|
|
33
|
-
* @dev Creates an IDA Index.
|
|
34
|
-
* @param indexId The id of the index.
|
|
35
|
-
* @param superToken The address of the `index` superToken.
|
|
36
|
-
* @param userData Extra user data provided.
|
|
37
|
-
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
38
|
-
*/
|
|
39
|
-
createIndex: ({ indexId, superToken, userData, }: IBaseIDAParams) => Operation;
|
|
40
|
-
/**
|
|
41
|
-
* @dev Distributes `amount` of `superToken` to an index
|
|
42
|
-
* @param indexId The id of the index.
|
|
43
|
-
* @param amount The amount of `superToken` to be distributed.
|
|
44
|
-
* @param superToken The superToken to be distributed.
|
|
45
|
-
* @param userData Extra user data provided.
|
|
46
|
-
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
47
|
-
*/
|
|
48
|
-
distribute: ({ indexId, amount, superToken, userData, }: IDistributeParams) => Operation;
|
|
49
|
-
/**
|
|
50
|
-
* @dev Updates the `indexValue` of an index.
|
|
51
|
-
* @description NOTE: It has the same effect as `distribute`, but is closer to the low level data structure of the index.
|
|
52
|
-
* @param indexId The id of the index.
|
|
53
|
-
* @param indexValue The new indexValue.
|
|
54
|
-
* @param superToken The superToken to be distributed.
|
|
55
|
-
* @param userData Extra user data provided.
|
|
56
|
-
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
57
|
-
*/
|
|
58
|
-
updateIndexValue: ({ indexId, indexValue, superToken, userData, }: IUpdateIndexValueParams) => Operation;
|
|
59
|
-
/**
|
|
60
|
-
* @dev Updates the `units` allocated to a Subscription.
|
|
61
|
-
* @param indexId The id of the index.
|
|
62
|
-
* @param superToken The superToken of the index.
|
|
63
|
-
* @param subscriber The subscriber address whose units you want to update.
|
|
64
|
-
* @param units The amount of units you want to update to.
|
|
65
|
-
* @param userData Extra user data provided.
|
|
66
|
-
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
67
|
-
*/
|
|
68
|
-
updateSubscriptionUnits: ({ indexId, superToken, subscriber, units, userData, }: IUpdateSubscriptionUnitsParams) => Operation;
|
|
69
|
-
/**
|
|
70
|
-
* @dev Approves a Subscription, so the Subscriber won't need to claim tokens when the Publisher distributes.
|
|
71
|
-
* @param indexId The id of the index.
|
|
72
|
-
* @param superToken The superToken of the index.
|
|
73
|
-
* @param publisher The publisher of the index you want to approve.
|
|
74
|
-
* @param userData Extra user data provided.
|
|
75
|
-
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
76
|
-
*/
|
|
77
|
-
approveSubscription: ({ indexId, superToken, publisher, userData, }: IBaseIDAParams) => Operation;
|
|
78
|
-
/**
|
|
79
|
-
* @dev Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher distributres.
|
|
80
|
-
* @param indexId The id of the index.
|
|
81
|
-
* @param superToken The superToken of the index.
|
|
82
|
-
* @param subscriber The subscriber address whose subscription you want to revoke.
|
|
83
|
-
* @param userData Extra user data provided.
|
|
84
|
-
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
85
|
-
*/
|
|
86
|
-
revokeSubscription: ({ indexId, superToken, publisher, userData, }: IBaseIDAParams) => Operation;
|
|
87
|
-
/**
|
|
88
|
-
* @dev Deletes a Subscription by setting the `units` allocated to the Subscriber to 0.
|
|
89
|
-
* @param indexId The id of the index.
|
|
90
|
-
* @param superToken The superToken of the index.
|
|
91
|
-
* @param subscriber The subscriber address whose subscription you want to delete.
|
|
92
|
-
* @param publisher The publisher address of the index you are targetting.
|
|
93
|
-
* @param userData Extra user data provided.
|
|
94
|
-
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
95
|
-
*/
|
|
96
|
-
deleteSubscription: ({ indexId, superToken, subscriber, publisher, userData, }: IBaseSubscriptionParams) => Operation;
|
|
97
|
-
/**
|
|
98
|
-
* @dev Claims any pending tokens allocated to the Subscription (unapproved).
|
|
99
|
-
* @param indexId The id of the index.
|
|
100
|
-
* @param superToken The superToken of the index.
|
|
101
|
-
* @param subscriber The subscriber address whose subscription you want to delete.
|
|
102
|
-
* @param publisher The publisher address of the index you are targetting.
|
|
103
|
-
* @param userData Extra user data provided.
|
|
104
|
-
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
105
|
-
*/
|
|
106
|
-
claim: ({ indexId, superToken, subscriber, publisher, userData, }: IBaseSubscriptionParams) => Operation;
|
|
107
|
-
}
|
package/dist/umd/Operation.d.ts
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { TransactionRequest } from "@ethersproject/abstract-provider";
|
|
2
|
-
import { ethers } from "ethers";
|
|
3
|
-
export declare type OperationType = "UNSUPPORTED" | "ERC20_APPROVE" | "ERC20_TRANSFER_FROM" | "SUPERTOKEN_UPGRADE" | "SUPERTOKEN_DOWNGRADE" | "SUPERFLUID_CALL_AGREEMENT" | "CALL_APP_ACTION";
|
|
4
|
-
/**
|
|
5
|
-
* @dev Operation Helper Class
|
|
6
|
-
* @description A helper class to create `Operation` objects which can be executed or batched.
|
|
7
|
-
*/
|
|
8
|
-
export default class Operation {
|
|
9
|
-
readonly populateTransactionPromise: Promise<ethers.PopulatedTransaction>;
|
|
10
|
-
readonly type: OperationType;
|
|
11
|
-
constructor(txn: Promise<ethers.PopulatedTransaction>, type: OperationType);
|
|
12
|
-
/**
|
|
13
|
-
* @dev Executes the operation via the provided signer.
|
|
14
|
-
* @description Populates all fields of the transaction, signs it and sends it to the network.
|
|
15
|
-
* @param signer The signer of the transacation
|
|
16
|
-
* @returns {ethers.providers.TransactionResponse} A TransactionResponse object which can be awaited
|
|
17
|
-
*/
|
|
18
|
-
exec: (signer: ethers.Signer) => Promise<ethers.providers.TransactionResponse>;
|
|
19
|
-
/**
|
|
20
|
-
* @dev Get the populated transaction by awaiting `populateTransactionPromise`.
|
|
21
|
-
* @description Note that we need to populate the txn with the signer.
|
|
22
|
-
* @returns {Promise<TransactionRequest>}
|
|
23
|
-
*/
|
|
24
|
-
getPopulatedTransactionRequest: (signer: ethers.Signer) => Promise<TransactionRequest>;
|
|
25
|
-
/**
|
|
26
|
-
* @dev Signs the populated transaction via the provided signer (what you intend on sending to the network).
|
|
27
|
-
* @param signer The signer of the transacation
|
|
28
|
-
* @returns {Promise<string>} Fully serialized, signed transaction
|
|
29
|
-
*/
|
|
30
|
-
getSignedTransaction: (signer: ethers.Signer) => Promise<string>;
|
|
31
|
-
/**
|
|
32
|
-
* @dev Gets the transaction hash of the transaction.
|
|
33
|
-
* @description Calculates this by getting the keccak256 hash of the signedTxn.
|
|
34
|
-
* @param signer The signer of the transacation
|
|
35
|
-
* @returns {Promise<string>} The transaction hash of the transaction
|
|
36
|
-
*/
|
|
37
|
-
getTransactionHash: (signer: ethers.Signer) => Promise<string>;
|
|
38
|
-
}
|
package/dist/umd/Query.d.ts
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { AllEvents, IEventFilter } from "./events";
|
|
2
|
-
import { IAccountTokenSnapshotFilter, IIndex, IIndexRequestFilter, IIndexSubscription, IIndexSubscriptionRequestFilter, ILightAccountTokenSnapshot, ILightEntity, IStream, IStreamRequestFilter, ISuperToken, ISuperTokenRequestFilter } from "./interfaces";
|
|
3
|
-
import { Ordering } from "./ordering";
|
|
4
|
-
import { PagedResult, Paging } from "./pagination";
|
|
5
|
-
import { AccountTokenSnapshot_OrderBy, Event_OrderBy, Index_OrderBy, IndexSubscription_OrderBy, Stream_OrderBy, Token_OrderBy } from "./subgraph/schema.generated";
|
|
6
|
-
import { DataMode } from "./types";
|
|
7
|
-
export interface IQueryOptions {
|
|
8
|
-
readonly customSubgraphQueriesEndpoint: string;
|
|
9
|
-
readonly dataMode: DataMode;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @dev Query Helper Class
|
|
13
|
-
* @description A helper class to create `Query` objects which can be used to query different data.
|
|
14
|
-
*/
|
|
15
|
-
export default class Query {
|
|
16
|
-
options: IQueryOptions;
|
|
17
|
-
private subgraphClient;
|
|
18
|
-
constructor(options: IQueryOptions);
|
|
19
|
-
/**
|
|
20
|
-
* A recursive function to fetch all possible results of a paged query.
|
|
21
|
-
* @param pagedQuery A paginated query that takes {@link Paging} as input.
|
|
22
|
-
*/
|
|
23
|
-
listAllResults: <T extends ILightEntity>(pagedQuery: (paging: Paging) => Promise<PagedResult<T>>) => Promise<T[]>;
|
|
24
|
-
listAllSuperTokens: (filter: ISuperTokenRequestFilter, paging?: Paging, ordering?: Ordering<Token_OrderBy>) => Promise<PagedResult<ISuperToken>>;
|
|
25
|
-
listIndexes: (filter: IIndexRequestFilter, paging?: Paging, ordering?: Ordering<Index_OrderBy>) => Promise<PagedResult<IIndex>>;
|
|
26
|
-
listIndexSubscriptions: (filter: IIndexSubscriptionRequestFilter, paging?: Paging, ordering?: Ordering<IndexSubscription_OrderBy>) => Promise<PagedResult<IIndexSubscription>>;
|
|
27
|
-
listStreams: (filter: IStreamRequestFilter, paging?: Paging, ordering?: Ordering<Stream_OrderBy>) => Promise<PagedResult<IStream>>;
|
|
28
|
-
listUserInteractedSuperTokens: (filter: IAccountTokenSnapshotFilter, paging?: Paging, ordering?: Ordering<AccountTokenSnapshot_OrderBy>) => Promise<PagedResult<ILightAccountTokenSnapshot>>;
|
|
29
|
-
listEvents: (filter: IEventFilter, paging?: Paging, ordering?: Ordering<Event_OrderBy>) => Promise<PagedResult<AllEvents>>;
|
|
30
|
-
on(callback: (events: AllEvents[], unsubscribe: () => void) => void, ms: number, account?: string, timeout?: number): () => void;
|
|
31
|
-
}
|