@superfluid-finance/sdk-core 0.3.3-dev.a92870f.0 → 0.3.3-dev.bd59c6c.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/CHANGELOG.md +25 -1
- package/README.md +2 -0
- package/dist/index.umd.js +6034 -2012
- package/dist/main/BatchCall.d.ts +6 -6
- package/dist/main/BatchCall.js +8 -8
- package/dist/main/BatchCall.js.map +1 -1
- package/dist/main/ConstantFlowAgreementV1.d.ts +106 -17
- package/dist/main/ConstantFlowAgreementV1.d.ts.map +1 -1
- package/dist/main/ConstantFlowAgreementV1.js +238 -50
- package/dist/main/ConstantFlowAgreementV1.js.map +1 -1
- package/dist/main/{Token.d.ts → ERC20Token.d.ts} +17 -14
- package/dist/main/ERC20Token.d.ts.map +1 -0
- package/dist/main/{Token.js → ERC20Token.js} +29 -33
- package/dist/main/ERC20Token.js.map +1 -0
- package/dist/main/Framework.d.ts +34 -7
- package/dist/main/Framework.d.ts.map +1 -1
- package/dist/main/Framework.js +88 -15
- package/dist/main/Framework.js.map +1 -1
- package/dist/main/Governance.d.ts +40 -0
- package/dist/main/Governance.d.ts.map +1 -0
- package/dist/main/Governance.js +82 -0
- package/dist/main/Governance.js.map +1 -0
- package/dist/main/Host.d.ts +3 -3
- package/dist/main/Host.d.ts.map +1 -1
- package/dist/main/Host.js +4 -4
- package/dist/main/Host.js.map +1 -1
- package/dist/main/InstantDistributionAgreementV1.d.ts +25 -22
- package/dist/main/InstantDistributionAgreementV1.d.ts.map +1 -1
- package/dist/main/InstantDistributionAgreementV1.js +69 -71
- package/dist/main/InstantDistributionAgreementV1.js.map +1 -1
- package/dist/main/Operation.d.ts +5 -5
- package/dist/main/Operation.js +5 -5
- package/dist/main/Query.d.ts +6 -6
- package/dist/main/Query.d.ts.map +1 -1
- package/dist/main/Query.js +18 -16
- package/dist/main/Query.js.map +1 -1
- package/dist/main/SFError.d.ts +1 -1
- package/dist/main/SFError.d.ts.map +1 -1
- package/dist/main/SFError.js +2 -0
- package/dist/main/SFError.js.map +1 -1
- package/dist/main/SuperToken.d.ts +226 -67
- package/dist/main/SuperToken.d.ts.map +1 -1
- package/dist/main/SuperToken.js +318 -132
- package/dist/main/SuperToken.js.map +1 -1
- package/dist/main/abi/IConstantFlowAgreementV1.json +335 -2
- package/dist/main/abi/ISETH.json +1604 -0
- package/dist/main/abi/SuperfluidGovernanceII.json +921 -0
- package/dist/main/constants.d.ts +4 -0
- package/dist/main/constants.d.ts.map +1 -1
- package/dist/main/constants.js +36 -13
- package/dist/main/constants.js.map +1 -1
- package/dist/main/defaultSubgraphReleaseTag.json +3 -0
- package/dist/main/events.d.ts +14 -2
- package/dist/main/events.d.ts.map +1 -1
- package/dist/main/frameworkHelpers.d.ts +2 -2
- package/dist/main/frameworkHelpers.js +2 -2
- package/dist/main/index.d.ts +16 -5
- package/dist/main/index.d.ts.map +1 -1
- package/dist/main/index.js +12 -1
- package/dist/main/index.js.map +1 -1
- package/dist/main/interfaces.d.ts +81 -8
- package/dist/main/interfaces.d.ts.map +1 -1
- package/dist/main/mapGetAllEventsQueryEvents.d.ts.map +1 -1
- package/dist/main/mapGetAllEventsQueryEvents.js +22 -1
- package/dist/main/mapGetAllEventsQueryEvents.js.map +1 -1
- package/dist/main/pagination.d.ts +42 -4
- package/dist/main/pagination.d.ts.map +1 -1
- package/dist/main/pagination.js +36 -5
- package/dist/main/pagination.js.map +1 -1
- package/dist/main/subgraph/SubgraphClient.d.ts +2 -2
- package/dist/main/subgraph/SubgraphClient.d.ts.map +1 -1
- package/dist/main/subgraph/SubgraphClient.js +0 -12
- package/dist/main/subgraph/SubgraphClient.js.map +1 -1
- package/dist/main/subgraph/entities/account/account.d.ts +1 -0
- package/dist/main/subgraph/entities/account/account.d.ts.map +1 -1
- package/dist/main/subgraph/entities/account/accounts.generated.d.ts +2 -0
- package/dist/main/subgraph/entities/account/accounts.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/account/accounts.generated.js +1 -1
- package/dist/main/subgraph/entities/account/accounts.generated.js.map +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts +2 -0
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts.map +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js +1 -0
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js.map +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js +1 -1
- package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js.map +1 -1
- package/dist/main/subgraph/entities/index/index.d.ts +2 -0
- package/dist/main/subgraph/entities/index/index.d.ts.map +1 -1
- package/dist/main/subgraph/entities/index/index.js +1 -0
- package/dist/main/subgraph/entities/index/index.js.map +1 -1
- package/dist/main/subgraph/entities/index/indexes.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/index/indexes.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/index/indexes.generated.js +1 -1
- package/dist/main/subgraph/entities/index/indexes.generated.js.map +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscription.d.ts +2 -0
- package/dist/main/subgraph/entities/indexSubscription/indexSubscription.d.ts.map +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscription.js +1 -0
- package/dist/main/subgraph/entities/indexSubscription/indexSubscription.js.map +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.js +1 -1
- package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.js.map +1 -1
- package/dist/main/subgraph/entities/stream/stream.d.ts +2 -0
- package/dist/main/subgraph/entities/stream/stream.d.ts.map +1 -1
- package/dist/main/subgraph/entities/stream/stream.js +1 -0
- package/dist/main/subgraph/entities/stream/stream.js.map +1 -1
- package/dist/main/subgraph/entities/stream/streams.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/stream/streams.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/stream/streams.generated.js +1 -1
- package/dist/main/subgraph/entities/stream/streams.generated.js.map +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriod.d.ts +2 -0
- package/dist/main/subgraph/entities/streamPeriod/streamPeriod.d.ts.map +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriod.js +1 -0
- package/dist/main/subgraph/entities/streamPeriod/streamPeriod.js.map +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts +3 -0
- package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.js +1 -1
- package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.js.map +1 -1
- package/dist/main/subgraph/entities/token/token.d.ts +1 -0
- package/dist/main/subgraph/entities/token/token.d.ts.map +1 -1
- package/dist/main/subgraph/entities/token/tokens.generated.d.ts +2 -0
- package/dist/main/subgraph/entities/token/tokens.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/token/tokens.generated.js +1 -1
- package/dist/main/subgraph/entities/token/tokens.generated.js.map +1 -1
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistic.d.ts +1 -0
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistic.d.ts.map +1 -1
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts +2 -0
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts.map +1 -1
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.js +1 -1
- package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.js.map +1 -1
- package/dist/main/subgraph/events/events.d.ts +1 -0
- package/dist/main/subgraph/events/events.d.ts.map +1 -1
- package/dist/main/subgraph/events/events.generated.d.ts +118 -3
- package/dist/main/subgraph/events/events.generated.d.ts.map +1 -1
- package/dist/main/subgraph/events/events.generated.js +38 -37
- package/dist/main/subgraph/events/events.generated.js.map +1 -1
- package/dist/main/subgraph/events/flowUpdatedEvent.d.ts +1 -0
- package/dist/main/subgraph/events/flowUpdatedEvent.d.ts.map +1 -1
- package/dist/main/subgraph/events/indexUpdatedEvent.d.ts +1 -0
- package/dist/main/subgraph/events/indexUpdatedEvent.d.ts.map +1 -1
- package/dist/main/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts +1 -0
- package/dist/main/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts.map +1 -1
- package/dist/main/subgraph/meta/meta.d.ts +15 -0
- package/dist/main/subgraph/meta/meta.d.ts.map +1 -0
- package/dist/main/subgraph/meta/meta.generated.d.ts +19 -0
- package/dist/main/subgraph/meta/meta.generated.d.ts.map +1 -0
- package/dist/main/subgraph/meta/meta.generated.js +5 -0
- package/dist/main/subgraph/meta/meta.generated.js.map +1 -0
- package/dist/main/subgraph/meta/meta.js +20 -0
- package/dist/main/subgraph/meta/meta.js.map +1 -0
- package/dist/main/subgraph/queries/getAllEvents.generated.d.ts +12 -0
- package/dist/main/subgraph/queries/getAllEvents.generated.d.ts.map +1 -1
- package/dist/main/subgraph/queries/getAllEvents.generated.js +1 -1
- package/dist/main/subgraph/queries/getAllEvents.generated.js.map +1 -1
- package/dist/main/subgraph/schema.generated.d.ts +817 -5
- package/dist/main/subgraph/schema.generated.d.ts.map +1 -1
- package/dist/main/subgraph/subgraphQueryHandler.d.ts +6 -3
- package/dist/main/subgraph/subgraphQueryHandler.d.ts.map +1 -1
- package/dist/main/subgraph/subgraphQueryHandler.js +30 -16
- package/dist/main/subgraph/subgraphQueryHandler.js.map +1 -1
- package/dist/main/typechain/IConstantFlowAgreementV1.d.ts +187 -5
- package/dist/main/typechain/IConstantFlowAgreementV1.d.ts.map +1 -1
- package/dist/main/typechain/ISETH.d.ts +1068 -0
- package/dist/main/typechain/ISETH.d.ts.map +1 -0
- package/dist/main/typechain/ISETH.js +3 -0
- package/dist/main/typechain/ISETH.js.map +1 -0
- package/dist/main/typechain/SuperfluidGovernanceII.d.ts +617 -0
- package/dist/main/typechain/SuperfluidGovernanceII.d.ts.map +1 -0
- package/dist/main/typechain/SuperfluidGovernanceII.js +3 -0
- package/dist/main/typechain/SuperfluidGovernanceII.js.map +1 -0
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.d.ts.map +1 -1
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.js +335 -2
- package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.js.map +1 -1
- package/dist/main/typechain/factories/ISETH__factory.d.ts +36 -0
- package/dist/main/typechain/factories/ISETH__factory.d.ts.map +1 -0
- package/dist/main/typechain/factories/ISETH__factory.js +1622 -0
- package/dist/main/typechain/factories/ISETH__factory.js.map +1 -0
- package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.d.ts +36 -0
- package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.d.ts.map +1 -0
- package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.js +939 -0
- package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.js.map +1 -0
- package/dist/main/typechain/index.d.ts +4 -0
- package/dist/main/typechain/index.d.ts.map +1 -1
- package/dist/main/typechain/index.js +5 -1
- package/dist/main/typechain/index.js.map +1 -1
- package/dist/main/utils.d.ts +15 -13
- package/dist/main/utils.d.ts.map +1 -1
- package/dist/main/utils.js +29 -15
- package/dist/main/utils.js.map +1 -1
- package/dist/module/BatchCall.d.ts +6 -6
- package/dist/module/BatchCall.js +8 -8
- package/dist/module/BatchCall.js.map +1 -1
- package/dist/module/ConstantFlowAgreementV1.d.ts +106 -17
- package/dist/module/ConstantFlowAgreementV1.d.ts.map +1 -1
- package/dist/module/ConstantFlowAgreementV1.js +239 -51
- package/dist/module/ConstantFlowAgreementV1.js.map +1 -1
- package/dist/module/{Token.d.ts → ERC20Token.d.ts} +17 -14
- package/dist/module/ERC20Token.d.ts.map +1 -0
- package/dist/module/{Token.js → ERC20Token.js} +28 -32
- package/dist/module/ERC20Token.js.map +1 -0
- package/dist/module/Framework.d.ts +34 -7
- package/dist/module/Framework.d.ts.map +1 -1
- package/dist/module/Framework.js +88 -15
- package/dist/module/Framework.js.map +1 -1
- package/dist/module/Governance.d.ts +40 -0
- package/dist/module/Governance.d.ts.map +1 -0
- package/dist/module/Governance.js +76 -0
- package/dist/module/Governance.js.map +1 -0
- package/dist/module/Host.d.ts +3 -3
- package/dist/module/Host.d.ts.map +1 -1
- package/dist/module/Host.js +4 -4
- package/dist/module/Host.js.map +1 -1
- package/dist/module/InstantDistributionAgreementV1.d.ts +25 -22
- package/dist/module/InstantDistributionAgreementV1.d.ts.map +1 -1
- package/dist/module/InstantDistributionAgreementV1.js +69 -71
- package/dist/module/InstantDistributionAgreementV1.js.map +1 -1
- package/dist/module/Operation.d.ts +5 -5
- package/dist/module/Operation.js +5 -5
- package/dist/module/Query.d.ts +6 -6
- package/dist/module/Query.d.ts.map +1 -1
- package/dist/module/Query.js +16 -16
- package/dist/module/Query.js.map +1 -1
- package/dist/module/SFError.d.ts +1 -1
- package/dist/module/SFError.d.ts.map +1 -1
- package/dist/module/SFError.js +2 -0
- package/dist/module/SFError.js.map +1 -1
- package/dist/module/SuperToken.d.ts +226 -67
- package/dist/module/SuperToken.d.ts.map +1 -1
- package/dist/module/SuperToken.js +315 -133
- package/dist/module/SuperToken.js.map +1 -1
- package/dist/module/abi/IConstantFlowAgreementV1.json +335 -2
- package/dist/module/abi/ISETH.json +1604 -0
- package/dist/module/abi/SuperfluidGovernanceII.json +921 -0
- package/dist/module/constants.d.ts +4 -0
- package/dist/module/constants.d.ts.map +1 -1
- package/dist/module/constants.js +32 -12
- package/dist/module/constants.js.map +1 -1
- package/dist/module/defaultSubgraphReleaseTag.json +3 -0
- package/dist/module/events.d.ts +14 -2
- package/dist/module/events.d.ts.map +1 -1
- package/dist/module/frameworkHelpers.d.ts +2 -2
- package/dist/module/frameworkHelpers.js +2 -2
- package/dist/module/index.d.ts +16 -5
- package/dist/module/index.d.ts.map +1 -1
- package/dist/module/index.js +16 -5
- package/dist/module/index.js.map +1 -1
- package/dist/module/interfaces.d.ts +81 -8
- package/dist/module/interfaces.d.ts.map +1 -1
- package/dist/module/mapGetAllEventsQueryEvents.d.ts.map +1 -1
- package/dist/module/mapGetAllEventsQueryEvents.js +22 -1
- package/dist/module/mapGetAllEventsQueryEvents.js.map +1 -1
- package/dist/module/pagination.d.ts +42 -4
- package/dist/module/pagination.d.ts.map +1 -1
- package/dist/module/pagination.js +30 -5
- package/dist/module/pagination.js.map +1 -1
- package/dist/module/subgraph/SubgraphClient.d.ts +2 -2
- package/dist/module/subgraph/SubgraphClient.d.ts.map +1 -1
- package/dist/module/subgraph/SubgraphClient.js +1 -13
- package/dist/module/subgraph/SubgraphClient.js.map +1 -1
- package/dist/module/subgraph/entities/account/account.d.ts +1 -0
- package/dist/module/subgraph/entities/account/account.d.ts.map +1 -1
- package/dist/module/subgraph/entities/account/accounts.generated.d.ts +2 -0
- package/dist/module/subgraph/entities/account/accounts.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/account/accounts.generated.js +1 -1
- package/dist/module/subgraph/entities/account/accounts.generated.js.map +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts +2 -0
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts.map +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js +1 -0
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js.map +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js +1 -1
- package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js.map +1 -1
- package/dist/module/subgraph/entities/index/index.d.ts +2 -0
- package/dist/module/subgraph/entities/index/index.d.ts.map +1 -1
- package/dist/module/subgraph/entities/index/index.js +1 -0
- package/dist/module/subgraph/entities/index/index.js.map +1 -1
- package/dist/module/subgraph/entities/index/indexes.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/index/indexes.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/index/indexes.generated.js +1 -1
- package/dist/module/subgraph/entities/index/indexes.generated.js.map +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscription.d.ts +2 -0
- package/dist/module/subgraph/entities/indexSubscription/indexSubscription.d.ts.map +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscription.js +1 -0
- package/dist/module/subgraph/entities/indexSubscription/indexSubscription.js.map +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.js +1 -1
- package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.js.map +1 -1
- package/dist/module/subgraph/entities/stream/stream.d.ts +2 -0
- package/dist/module/subgraph/entities/stream/stream.d.ts.map +1 -1
- package/dist/module/subgraph/entities/stream/stream.js +1 -0
- package/dist/module/subgraph/entities/stream/stream.js.map +1 -1
- package/dist/module/subgraph/entities/stream/streams.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/stream/streams.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/stream/streams.generated.js +1 -1
- package/dist/module/subgraph/entities/stream/streams.generated.js.map +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriod.d.ts +2 -0
- package/dist/module/subgraph/entities/streamPeriod/streamPeriod.d.ts.map +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriod.js +1 -0
- package/dist/module/subgraph/entities/streamPeriod/streamPeriod.js.map +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts +3 -0
- package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.js +1 -1
- package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.js.map +1 -1
- package/dist/module/subgraph/entities/token/token.d.ts +1 -0
- package/dist/module/subgraph/entities/token/token.d.ts.map +1 -1
- package/dist/module/subgraph/entities/token/tokens.generated.d.ts +2 -0
- package/dist/module/subgraph/entities/token/tokens.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/token/tokens.generated.js +1 -1
- package/dist/module/subgraph/entities/token/tokens.generated.js.map +1 -1
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistic.d.ts +1 -0
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistic.d.ts.map +1 -1
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts +2 -0
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts.map +1 -1
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.js +1 -1
- package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.js.map +1 -1
- package/dist/module/subgraph/events/events.d.ts +1 -0
- package/dist/module/subgraph/events/events.d.ts.map +1 -1
- package/dist/module/subgraph/events/events.generated.d.ts +118 -3
- package/dist/module/subgraph/events/events.generated.d.ts.map +1 -1
- package/dist/module/subgraph/events/events.generated.js +37 -36
- package/dist/module/subgraph/events/events.generated.js.map +1 -1
- package/dist/module/subgraph/events/flowUpdatedEvent.d.ts +1 -0
- package/dist/module/subgraph/events/flowUpdatedEvent.d.ts.map +1 -1
- package/dist/module/subgraph/events/indexUpdatedEvent.d.ts +1 -0
- package/dist/module/subgraph/events/indexUpdatedEvent.d.ts.map +1 -1
- package/dist/module/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts +1 -0
- package/dist/module/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts.map +1 -1
- package/dist/module/subgraph/meta/meta.d.ts +15 -0
- package/dist/module/subgraph/meta/meta.d.ts.map +1 -0
- package/dist/module/subgraph/meta/meta.generated.d.ts +19 -0
- package/dist/module/subgraph/meta/meta.generated.d.ts.map +1 -0
- package/dist/module/subgraph/meta/meta.generated.js +2 -0
- package/dist/module/subgraph/meta/meta.generated.js.map +1 -0
- package/dist/module/subgraph/meta/meta.js +16 -0
- package/dist/module/subgraph/meta/meta.js.map +1 -0
- package/dist/module/subgraph/queries/getAllEvents.generated.d.ts +12 -0
- package/dist/module/subgraph/queries/getAllEvents.generated.d.ts.map +1 -1
- package/dist/module/subgraph/queries/getAllEvents.generated.js +1 -1
- package/dist/module/subgraph/queries/getAllEvents.generated.js.map +1 -1
- package/dist/module/subgraph/schema.generated.d.ts +817 -5
- package/dist/module/subgraph/schema.generated.d.ts.map +1 -1
- package/dist/module/subgraph/subgraphQueryHandler.d.ts +6 -3
- package/dist/module/subgraph/subgraphQueryHandler.d.ts.map +1 -1
- package/dist/module/subgraph/subgraphQueryHandler.js +31 -17
- package/dist/module/subgraph/subgraphQueryHandler.js.map +1 -1
- package/dist/module/typechain/IConstantFlowAgreementV1.d.ts +187 -5
- package/dist/module/typechain/IConstantFlowAgreementV1.d.ts.map +1 -1
- package/dist/module/typechain/ISETH.d.ts +1068 -0
- package/dist/module/typechain/ISETH.d.ts.map +1 -0
- package/dist/module/typechain/ISETH.js +2 -0
- package/dist/module/typechain/ISETH.js.map +1 -0
- package/dist/module/typechain/SuperfluidGovernanceII.d.ts +617 -0
- package/dist/module/typechain/SuperfluidGovernanceII.d.ts.map +1 -0
- package/dist/module/typechain/SuperfluidGovernanceII.js +2 -0
- package/dist/module/typechain/SuperfluidGovernanceII.js.map +1 -0
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.d.ts.map +1 -1
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.js +335 -2
- package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.js.map +1 -1
- package/dist/module/typechain/factories/ISETH__factory.d.ts +36 -0
- package/dist/module/typechain/factories/ISETH__factory.d.ts.map +1 -0
- package/dist/module/typechain/factories/ISETH__factory.js +1618 -0
- package/dist/module/typechain/factories/ISETH__factory.js.map +1 -0
- package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.d.ts +36 -0
- package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.d.ts.map +1 -0
- package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.js +935 -0
- package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.js.map +1 -0
- package/dist/module/typechain/index.d.ts +4 -0
- package/dist/module/typechain/index.d.ts.map +1 -1
- package/dist/module/typechain/index.js +2 -0
- package/dist/module/typechain/index.js.map +1 -1
- package/dist/module/utils.d.ts +15 -13
- package/dist/module/utils.d.ts.map +1 -1
- package/dist/module/utils.js +27 -15
- package/dist/module/utils.js.map +1 -1
- package/package.json +11 -41
- package/dist/main/Token.d.ts.map +0 -1
- package/dist/main/Token.js.map +0 -1
- package/dist/module/Token.d.ts.map +0 -1
- package/dist/module/Token.js.map +0 -1
package/dist/main/Host.js
CHANGED
|
@@ -7,13 +7,13 @@ const ethers_1 = require("ethers");
|
|
|
7
7
|
const Operation_1 = __importDefault(require("./Operation"));
|
|
8
8
|
const Superfluid_json_1 = __importDefault(require("./abi/Superfluid.json"));
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Host Helper Class
|
|
11
11
|
* @description A helper class which can be used as a standalone class to populate call agreement transactions.
|
|
12
12
|
*/
|
|
13
13
|
class Host {
|
|
14
14
|
constructor(hostAddress) {
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* Creates an Operation of the `callAgreement` function on the host contract.
|
|
17
17
|
* @param agreementAddress the agreement address (cfa or ida address)
|
|
18
18
|
* @param callData the encoded callData for the function
|
|
19
19
|
* @param userData any additional user data
|
|
@@ -21,10 +21,10 @@ class Host {
|
|
|
21
21
|
* @returns {Operation} an `Operation` class
|
|
22
22
|
*/
|
|
23
23
|
this.populateCallAgreementTxnAndReturnOperation = (agreementAddress, callData, userData, overrides) => {
|
|
24
|
-
const txn = this.
|
|
24
|
+
const txn = this.contract.populateTransaction.callAgreement(agreementAddress, callData, userData || "0x", overrides || {});
|
|
25
25
|
return new Operation_1.default(txn, "SUPERFLUID_CALL_AGREEMENT");
|
|
26
26
|
};
|
|
27
|
-
this.
|
|
27
|
+
this.contract = new ethers_1.ethers.Contract(hostAddress, Superfluid_json_1.default.abi);
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
exports.default = Host;
|
package/dist/main/Host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Host.js","sourceRoot":"","sources":["../../src/Host.ts"],"names":[],"mappings":";;;;;AAAA,mCAA2C;AAE3C,4DAAoC;AACpC,4EAAkD;AAGlD;;;GAGG;AACH,MAAqB,IAAI;IAGrB,YAAY,WAAmB;QAO/B;;;;;;;WAOG;QACH,+CAA0C,GAAG,CACzC,gBAAwB,EACxB,QAAgB,EAChB,QAA4B,EAC5B,SAA2D,EAClD,EAAE;YACX,MAAM,GAAG,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"Host.js","sourceRoot":"","sources":["../../src/Host.ts"],"names":[],"mappings":";;;;;AAAA,mCAA2C;AAE3C,4DAAoC;AACpC,4EAAkD;AAGlD;;;GAGG;AACH,MAAqB,IAAI;IAGrB,YAAY,WAAmB;QAO/B;;;;;;;WAOG;QACH,+CAA0C,GAAG,CACzC,gBAAwB,EACxB,QAAgB,EAChB,QAA4B,EAC5B,SAA2D,EAClD,EAAE;YACX,MAAM,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,aAAa,CACvD,gBAAgB,EAChB,QAAQ,EACR,QAAQ,IAAI,IAAI,EAChB,SAAS,IAAI,EAAE,CAClB,CAAC;YACF,OAAO,IAAI,mBAAS,CAAC,GAAG,EAAE,2BAA2B,CAAC,CAAC;QAC3D,CAAC,CAAC;QA3BE,IAAI,CAAC,QAAQ,GAAG,IAAI,eAAM,CAAC,QAAQ,CAC/B,WAAW,EACX,yBAAa,CAAC,GAAG,CACN,CAAC;IACpB,CAAC;CAwBJ;AAhCD,uBAgCC"}
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
import Host from "./Host";
|
|
2
2
|
import Operation from "./Operation";
|
|
3
3
|
import { IAgreementV1Options, IApproveSubscriptionParams, IClaimParams, ICreateIndexParams, IDeleteSubscriptionParams, IDistributeParams, IGetIndexParams, IGetSubscriptionParams, IRevokeSubscriptionParams, IUpdateIndexValueParams, IUpdateSubscriptionUnitsParams, IWeb3Index, IWeb3Subscription } from "./interfaces";
|
|
4
|
+
import { IInstantDistributionAgreementV1 } from "./typechain";
|
|
4
5
|
/**
|
|
5
|
-
*
|
|
6
|
+
* Instant Distribution Agreement V1 Helper Class
|
|
6
7
|
* @description A helper class to interact with the IDAV1 contract.
|
|
7
8
|
*/
|
|
8
9
|
export default class InstantDistributionAgreementV1 {
|
|
9
10
|
readonly options: IAgreementV1Options;
|
|
10
11
|
readonly host: Host;
|
|
12
|
+
readonly contract: IInstantDistributionAgreementV1;
|
|
11
13
|
constructor(options: IAgreementV1Options);
|
|
12
|
-
|
|
14
|
+
/** ### IDA Read Functions ### */
|
|
13
15
|
/**
|
|
14
|
-
*
|
|
16
|
+
* Get the details of a `Subscription`.
|
|
15
17
|
* @param superToken the superToken of the agreement
|
|
16
18
|
* @param publisher the address of the publisher of the index
|
|
17
19
|
* @param indexId the index id
|
|
@@ -19,27 +21,28 @@ export default class InstantDistributionAgreementV1 {
|
|
|
19
21
|
* @param providerOrSigner a provider or signer object
|
|
20
22
|
* @returns {Promise<IWeb3Subscription>} Web3 Subscription object
|
|
21
23
|
*/
|
|
22
|
-
getSubscription: (
|
|
24
|
+
getSubscription: (params: IGetSubscriptionParams) => Promise<IWeb3Subscription>;
|
|
23
25
|
/**
|
|
24
|
-
*
|
|
26
|
+
* Get the details of an `Index`.
|
|
25
27
|
* @param superToken the superToken of the agreement
|
|
26
28
|
* @param publisher the address of the publisher of the index
|
|
27
29
|
* @param indexId the index id
|
|
28
30
|
* @param providerOrSigner a provider or signer object
|
|
29
31
|
* @returns {Promise<IWeb3Index>} Web3 Index object
|
|
30
32
|
*/
|
|
31
|
-
getIndex: (
|
|
33
|
+
getIndex: (params: IGetIndexParams) => Promise<IWeb3Index>;
|
|
34
|
+
/** ### IDA Write Functions ### */
|
|
32
35
|
/**
|
|
33
|
-
*
|
|
36
|
+
* Creates an IDA Index.
|
|
34
37
|
* @param indexId The id of the index.
|
|
35
38
|
* @param superToken The address of the `index` superToken.
|
|
36
39
|
* @param userData Extra user data provided.
|
|
37
40
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
38
41
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
39
42
|
*/
|
|
40
|
-
createIndex: (
|
|
43
|
+
createIndex: (params: ICreateIndexParams) => Operation;
|
|
41
44
|
/**
|
|
42
|
-
*
|
|
45
|
+
* Distributes `amount` of `superToken` to an index
|
|
43
46
|
* @param indexId The id of the index.
|
|
44
47
|
* @param amount The amount of `superToken` to be distributed.
|
|
45
48
|
* @param superToken The superToken to be distributed.
|
|
@@ -47,9 +50,9 @@ export default class InstantDistributionAgreementV1 {
|
|
|
47
50
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
48
51
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
49
52
|
*/
|
|
50
|
-
distribute: (
|
|
53
|
+
distribute: (params: IDistributeParams) => Operation;
|
|
51
54
|
/**
|
|
52
|
-
*
|
|
55
|
+
* Updates the `indexValue` of an index.
|
|
53
56
|
* @description NOTE: It has the same effect as `distribute`, but is closer to the low level data structure of the index.
|
|
54
57
|
* @param indexId The id of the index.
|
|
55
58
|
* @param indexValue The new indexValue.
|
|
@@ -58,9 +61,9 @@ export default class InstantDistributionAgreementV1 {
|
|
|
58
61
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
59
62
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
60
63
|
*/
|
|
61
|
-
updateIndexValue: (
|
|
64
|
+
updateIndexValue: (params: IUpdateIndexValueParams) => Operation;
|
|
62
65
|
/**
|
|
63
|
-
*
|
|
66
|
+
* Updates the `units` allocated to a Subscription.
|
|
64
67
|
* @param indexId The id of the index.
|
|
65
68
|
* @param superToken The superToken of the index.
|
|
66
69
|
* @param subscriber The subscriber address whose units you want to update.
|
|
@@ -69,9 +72,9 @@ export default class InstantDistributionAgreementV1 {
|
|
|
69
72
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
70
73
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
71
74
|
*/
|
|
72
|
-
updateSubscriptionUnits: (
|
|
75
|
+
updateSubscriptionUnits: (params: IUpdateSubscriptionUnitsParams) => Operation;
|
|
73
76
|
/**
|
|
74
|
-
*
|
|
77
|
+
* Approves a Subscription, so the Subscriber won't need to claim tokens when the Publisher distributes.
|
|
75
78
|
* @param indexId The id of the index.
|
|
76
79
|
* @param superToken The superToken of the index.
|
|
77
80
|
* @param publisher The publisher of the index you want to approve.
|
|
@@ -79,9 +82,9 @@ export default class InstantDistributionAgreementV1 {
|
|
|
79
82
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
80
83
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
81
84
|
*/
|
|
82
|
-
approveSubscription: (
|
|
85
|
+
approveSubscription: (params: IApproveSubscriptionParams) => Operation;
|
|
83
86
|
/**
|
|
84
|
-
*
|
|
87
|
+
* Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher distributres.
|
|
85
88
|
* @param indexId The id of the index.
|
|
86
89
|
* @param superToken The superToken of the index.
|
|
87
90
|
* @param subscriber The subscriber address whose subscription you want to revoke.
|
|
@@ -89,9 +92,9 @@ export default class InstantDistributionAgreementV1 {
|
|
|
89
92
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
90
93
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
91
94
|
*/
|
|
92
|
-
revokeSubscription: (
|
|
95
|
+
revokeSubscription: (params: IRevokeSubscriptionParams) => Operation;
|
|
93
96
|
/**
|
|
94
|
-
*
|
|
97
|
+
* Deletes a Subscription by setting the `units` allocated to the Subscriber to 0.
|
|
95
98
|
* @param indexId The id of the index.
|
|
96
99
|
* @param superToken The superToken of the index.
|
|
97
100
|
* @param subscriber The subscriber address whose subscription you want to delete.
|
|
@@ -100,9 +103,9 @@ export default class InstantDistributionAgreementV1 {
|
|
|
100
103
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
101
104
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
102
105
|
*/
|
|
103
|
-
deleteSubscription: (
|
|
106
|
+
deleteSubscription: (params: IDeleteSubscriptionParams) => Operation;
|
|
104
107
|
/**
|
|
105
|
-
*
|
|
108
|
+
* Claims any pending tokens allocated to the Subscription (unapproved).
|
|
106
109
|
* @param indexId The id of the index.
|
|
107
110
|
* @param superToken The superToken of the index.
|
|
108
111
|
* @param subscriber The subscriber address whose subscription you want to delete.
|
|
@@ -111,6 +114,6 @@ export default class InstantDistributionAgreementV1 {
|
|
|
111
114
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
112
115
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
113
116
|
*/
|
|
114
|
-
claim: (
|
|
117
|
+
claim: (params: IClaimParams) => Operation;
|
|
115
118
|
}
|
|
116
119
|
//# sourceMappingURL=InstantDistributionAgreementV1.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstantDistributionAgreementV1.d.ts","sourceRoot":"","sources":["../../src/InstantDistributionAgreementV1.ts"],"names":[],"mappings":"AAEA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC,OAAO,EACH,mBAAmB,EACnB,0BAA0B,EAC1B,YAAY,EACZ,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,8BAA8B,EAC9B,UAAU,EACV,iBAAiB,EACpB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"InstantDistributionAgreementV1.d.ts","sourceRoot":"","sources":["../../src/InstantDistributionAgreementV1.ts"],"names":[],"mappings":"AAEA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC,OAAO,EACH,mBAAmB,EACnB,0BAA0B,EAC1B,YAAY,EACZ,kBAAkB,EAClB,yBAAyB,EACzB,iBAAiB,EACjB,eAAe,EACf,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,8BAA8B,EAC9B,UAAU,EACV,iBAAiB,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,+BAA+B,EAAE,MAAM,aAAa,CAAC;AAO9D;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,8BAA8B;IAC/C,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,+BAA+B,CAAC;gBAEvC,OAAO,EAAE,mBAAmB;IASxC,iCAAiC;IAEjC;;;;;;;;OAQG;IACH,eAAe,WACH,sBAAsB,KAC/B,QAAQ,iBAAiB,CAAC,CA4B3B;IAEF;;;;;;;OAOG;IACH,QAAQ,WAAkB,eAAe,KAAG,QAAQ,UAAU,CAAC,CAoB7D;IAEF,kCAAkC;IAElC;;;;;;;OAOG;IACH,WAAW,WAAY,kBAAkB,KAAG,SAAS,CAcnD;IAEF;;;;;;;;OAQG;IACH,UAAU,WAAY,iBAAiB,KAAG,SAAS,CAejD;IAEF;;;;;;;;;OASG;IACH,gBAAgB,WAAY,uBAAuB,KAAG,SAAS,CAe7D;IAEF;;;;;;;;;OASG;IACH,uBAAuB,WACX,8BAA8B,KACvC,SAAS,CAiBV;IAEF;;;;;;;;OAQG;IACH,mBAAmB,WAAY,0BAA0B,KAAG,SAAS,CAcnE;IAEF;;;;;;;;OAQG;IACH,kBAAkB,WAAY,yBAAyB,KAAG,SAAS,CAgBjE;IAEF;;;;;;;;;OASG;IACH,kBAAkB,WAAY,yBAAyB,KAAG,SAAS,CAkBjE;IAEF;;;;;;;;;OASG;IACH,KAAK,WAAY,YAAY,KAAG,SAAS,CAkBvC;CACL"}
|
|
@@ -10,14 +10,14 @@ const IInstantDistributionAgreementV1_json_1 = __importDefault(require("./abi/II
|
|
|
10
10
|
const utils_1 = require("./utils");
|
|
11
11
|
const idaInterface = new ethers_1.ethers.utils.Interface(IInstantDistributionAgreementV1_json_1.default.abi);
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Instant Distribution Agreement V1 Helper Class
|
|
14
14
|
* @description A helper class to interact with the IDAV1 contract.
|
|
15
15
|
*/
|
|
16
16
|
class InstantDistributionAgreementV1 {
|
|
17
17
|
constructor(options) {
|
|
18
|
-
|
|
18
|
+
/** ### IDA Read Functions ### */
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Get the details of a `Subscription`.
|
|
21
21
|
* @param superToken the superToken of the agreement
|
|
22
22
|
* @param publisher the address of the publisher of the index
|
|
23
23
|
* @param indexId the index id
|
|
@@ -25,14 +25,14 @@ class InstantDistributionAgreementV1 {
|
|
|
25
25
|
* @param providerOrSigner a provider or signer object
|
|
26
26
|
* @returns {Promise<IWeb3Subscription>} Web3 Subscription object
|
|
27
27
|
*/
|
|
28
|
-
this.getSubscription = async (
|
|
29
|
-
const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
|
|
30
|
-
const normalizedPublisher = (0, utils_1.normalizeAddress)(publisher);
|
|
31
|
-
const normalizedSubscriber = (0, utils_1.normalizeAddress)(subscriber);
|
|
28
|
+
this.getSubscription = async (params) => {
|
|
29
|
+
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
30
|
+
const normalizedPublisher = (0, utils_1.normalizeAddress)(params.publisher);
|
|
31
|
+
const normalizedSubscriber = (0, utils_1.normalizeAddress)(params.subscriber);
|
|
32
32
|
try {
|
|
33
|
-
const subscription = await this.
|
|
34
|
-
.connect(providerOrSigner)
|
|
35
|
-
.getSubscription(normalizedToken, normalizedPublisher, indexId, normalizedSubscriber);
|
|
33
|
+
const subscription = await this.contract
|
|
34
|
+
.connect(params.providerOrSigner)
|
|
35
|
+
.getSubscription(normalizedToken, normalizedPublisher, params.indexId, normalizedSubscriber);
|
|
36
36
|
return {
|
|
37
37
|
exist: subscription.exist,
|
|
38
38
|
approved: subscription.approved,
|
|
@@ -49,20 +49,20 @@ class InstantDistributionAgreementV1 {
|
|
|
49
49
|
}
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Get the details of an `Index`.
|
|
53
53
|
* @param superToken the superToken of the agreement
|
|
54
54
|
* @param publisher the address of the publisher of the index
|
|
55
55
|
* @param indexId the index id
|
|
56
56
|
* @param providerOrSigner a provider or signer object
|
|
57
57
|
* @returns {Promise<IWeb3Index>} Web3 Index object
|
|
58
58
|
*/
|
|
59
|
-
this.getIndex = async (
|
|
60
|
-
const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
|
|
61
|
-
const normalizedPublisher = (0, utils_1.normalizeAddress)(publisher);
|
|
59
|
+
this.getIndex = async (params) => {
|
|
60
|
+
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
61
|
+
const normalizedPublisher = (0, utils_1.normalizeAddress)(params.publisher);
|
|
62
62
|
try {
|
|
63
|
-
const index = await this.
|
|
64
|
-
.connect(providerOrSigner)
|
|
65
|
-
.getIndex(normalizedToken, normalizedPublisher, indexId);
|
|
63
|
+
const index = await this.contract
|
|
64
|
+
.connect(params.providerOrSigner)
|
|
65
|
+
.getIndex(normalizedToken, normalizedPublisher, params.indexId);
|
|
66
66
|
return {
|
|
67
67
|
exist: index.exist,
|
|
68
68
|
indexValue: index.indexValue.toString(),
|
|
@@ -78,26 +78,26 @@ class InstantDistributionAgreementV1 {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
|
|
81
|
+
/** ### IDA Write Functions ### */
|
|
82
82
|
/**
|
|
83
|
-
*
|
|
83
|
+
* Creates an IDA Index.
|
|
84
84
|
* @param indexId The id of the index.
|
|
85
85
|
* @param superToken The address of the `index` superToken.
|
|
86
86
|
* @param userData Extra user data provided.
|
|
87
87
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
88
88
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
89
89
|
*/
|
|
90
|
-
this.createIndex = (
|
|
91
|
-
const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
|
|
90
|
+
this.createIndex = (params) => {
|
|
91
|
+
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
92
92
|
const callData = idaInterface.encodeFunctionData("createIndex", [
|
|
93
93
|
normalizedToken,
|
|
94
|
-
indexId,
|
|
94
|
+
params.indexId,
|
|
95
95
|
"0x",
|
|
96
96
|
]);
|
|
97
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
97
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
98
98
|
};
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
100
|
+
* Distributes `amount` of `superToken` to an index
|
|
101
101
|
* @param indexId The id of the index.
|
|
102
102
|
* @param amount The amount of `superToken` to be distributed.
|
|
103
103
|
* @param superToken The superToken to be distributed.
|
|
@@ -105,18 +105,18 @@ class InstantDistributionAgreementV1 {
|
|
|
105
105
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
106
106
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
107
107
|
*/
|
|
108
|
-
this.distribute = (
|
|
109
|
-
const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
|
|
108
|
+
this.distribute = (params) => {
|
|
109
|
+
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
110
110
|
const callData = idaInterface.encodeFunctionData("distribute", [
|
|
111
111
|
normalizedToken,
|
|
112
|
-
indexId,
|
|
113
|
-
amount,
|
|
112
|
+
params.indexId,
|
|
113
|
+
params.amount,
|
|
114
114
|
"0x",
|
|
115
115
|
]);
|
|
116
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
116
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
117
117
|
};
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* Updates the `indexValue` of an index.
|
|
120
120
|
* @description NOTE: It has the same effect as `distribute`, but is closer to the low level data structure of the index.
|
|
121
121
|
* @param indexId The id of the index.
|
|
122
122
|
* @param indexValue The new indexValue.
|
|
@@ -125,18 +125,18 @@ class InstantDistributionAgreementV1 {
|
|
|
125
125
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
126
126
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
127
127
|
*/
|
|
128
|
-
this.updateIndexValue = (
|
|
129
|
-
const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
|
|
128
|
+
this.updateIndexValue = (params) => {
|
|
129
|
+
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
130
130
|
const callData = idaInterface.encodeFunctionData("updateIndex", [
|
|
131
131
|
normalizedToken,
|
|
132
|
-
indexId,
|
|
133
|
-
indexValue,
|
|
132
|
+
params.indexId,
|
|
133
|
+
params.indexValue,
|
|
134
134
|
"0x",
|
|
135
135
|
]);
|
|
136
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
136
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
137
137
|
};
|
|
138
138
|
/**
|
|
139
|
-
*
|
|
139
|
+
* Updates the `units` allocated to a Subscription.
|
|
140
140
|
* @param indexId The id of the index.
|
|
141
141
|
* @param superToken The superToken of the index.
|
|
142
142
|
* @param subscriber The subscriber address whose units you want to update.
|
|
@@ -145,20 +145,20 @@ class InstantDistributionAgreementV1 {
|
|
|
145
145
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
146
146
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
147
147
|
*/
|
|
148
|
-
this.updateSubscriptionUnits = (
|
|
149
|
-
const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
|
|
150
|
-
const normalizedSubscriber = (0, utils_1.normalizeAddress)(subscriber);
|
|
148
|
+
this.updateSubscriptionUnits = (params) => {
|
|
149
|
+
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
150
|
+
const normalizedSubscriber = (0, utils_1.normalizeAddress)(params.subscriber);
|
|
151
151
|
const callData = idaInterface.encodeFunctionData("updateSubscription", [
|
|
152
152
|
normalizedToken,
|
|
153
|
-
indexId,
|
|
153
|
+
params.indexId,
|
|
154
154
|
normalizedSubscriber,
|
|
155
|
-
units,
|
|
155
|
+
params.units,
|
|
156
156
|
"0x",
|
|
157
157
|
]);
|
|
158
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
158
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
159
159
|
};
|
|
160
160
|
/**
|
|
161
|
-
*
|
|
161
|
+
* Approves a Subscription, so the Subscriber won't need to claim tokens when the Publisher distributes.
|
|
162
162
|
* @param indexId The id of the index.
|
|
163
163
|
* @param superToken The superToken of the index.
|
|
164
164
|
* @param publisher The publisher of the index you want to approve.
|
|
@@ -166,14 +166,14 @@ class InstantDistributionAgreementV1 {
|
|
|
166
166
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
167
167
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
168
168
|
*/
|
|
169
|
-
this.approveSubscription = (
|
|
170
|
-
const normalizedPublisher = (0, utils_1.normalizeAddress)(publisher);
|
|
171
|
-
const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
|
|
172
|
-
const callData = idaInterface.encodeFunctionData("approveSubscription", [normalizedToken, normalizedPublisher, indexId, "0x"]);
|
|
173
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
169
|
+
this.approveSubscription = (params) => {
|
|
170
|
+
const normalizedPublisher = (0, utils_1.normalizeAddress)(params.publisher);
|
|
171
|
+
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
172
|
+
const callData = idaInterface.encodeFunctionData("approveSubscription", [normalizedToken, normalizedPublisher, params.indexId, "0x"]);
|
|
173
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
174
174
|
};
|
|
175
175
|
/**
|
|
176
|
-
*
|
|
176
|
+
* Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher distributres.
|
|
177
177
|
* @param indexId The id of the index.
|
|
178
178
|
* @param superToken The superToken of the index.
|
|
179
179
|
* @param subscriber The subscriber address whose subscription you want to revoke.
|
|
@@ -181,19 +181,19 @@ class InstantDistributionAgreementV1 {
|
|
|
181
181
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
182
182
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
183
183
|
*/
|
|
184
|
-
this.revokeSubscription = (
|
|
185
|
-
const normalizedPublisher = (0, utils_1.normalizeAddress)(publisher);
|
|
186
|
-
const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
|
|
184
|
+
this.revokeSubscription = (params) => {
|
|
185
|
+
const normalizedPublisher = (0, utils_1.normalizeAddress)(params.publisher);
|
|
186
|
+
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
187
187
|
const callData = idaInterface.encodeFunctionData("revokeSubscription", [
|
|
188
188
|
normalizedToken,
|
|
189
189
|
normalizedPublisher,
|
|
190
|
-
indexId,
|
|
190
|
+
params.indexId,
|
|
191
191
|
"0x",
|
|
192
192
|
]);
|
|
193
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
193
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
194
194
|
};
|
|
195
195
|
/**
|
|
196
|
-
*
|
|
196
|
+
* Deletes a Subscription by setting the `units` allocated to the Subscriber to 0.
|
|
197
197
|
* @param indexId The id of the index.
|
|
198
198
|
* @param superToken The superToken of the index.
|
|
199
199
|
* @param subscriber The subscriber address whose subscription you want to delete.
|
|
@@ -202,21 +202,21 @@ class InstantDistributionAgreementV1 {
|
|
|
202
202
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
203
203
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
204
204
|
*/
|
|
205
|
-
this.deleteSubscription = (
|
|
206
|
-
const normalizedPublisher = (0, utils_1.normalizeAddress)(publisher);
|
|
207
|
-
const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
|
|
208
|
-
const normalizedSubscriber = (0, utils_1.normalizeAddress)(subscriber);
|
|
205
|
+
this.deleteSubscription = (params) => {
|
|
206
|
+
const normalizedPublisher = (0, utils_1.normalizeAddress)(params.publisher);
|
|
207
|
+
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
208
|
+
const normalizedSubscriber = (0, utils_1.normalizeAddress)(params.subscriber);
|
|
209
209
|
const callData = idaInterface.encodeFunctionData("deleteSubscription", [
|
|
210
210
|
normalizedToken,
|
|
211
211
|
normalizedPublisher,
|
|
212
|
-
indexId,
|
|
212
|
+
params.indexId,
|
|
213
213
|
normalizedSubscriber,
|
|
214
214
|
"0x",
|
|
215
215
|
]);
|
|
216
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
216
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
217
217
|
};
|
|
218
218
|
/**
|
|
219
|
-
*
|
|
219
|
+
* Claims any pending tokens allocated to the Subscription (unapproved).
|
|
220
220
|
* @param indexId The id of the index.
|
|
221
221
|
* @param superToken The superToken of the index.
|
|
222
222
|
* @param subscriber The subscriber address whose subscription you want to delete.
|
|
@@ -225,24 +225,22 @@ class InstantDistributionAgreementV1 {
|
|
|
225
225
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
226
226
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
227
227
|
*/
|
|
228
|
-
this.claim = (
|
|
229
|
-
const normalizedPublisher = (0, utils_1.normalizeAddress)(publisher);
|
|
230
|
-
const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
|
|
231
|
-
const normalizedSubscriber = (0, utils_1.normalizeAddress)(subscriber);
|
|
228
|
+
this.claim = (params) => {
|
|
229
|
+
const normalizedPublisher = (0, utils_1.normalizeAddress)(params.publisher);
|
|
230
|
+
const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
|
|
231
|
+
const normalizedSubscriber = (0, utils_1.normalizeAddress)(params.subscriber);
|
|
232
232
|
const callData = idaInterface.encodeFunctionData("claim", [
|
|
233
233
|
normalizedToken,
|
|
234
234
|
normalizedPublisher,
|
|
235
|
-
indexId,
|
|
235
|
+
params.indexId,
|
|
236
236
|
normalizedSubscriber,
|
|
237
237
|
"0x",
|
|
238
238
|
]);
|
|
239
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
239
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
240
240
|
};
|
|
241
241
|
this.options = options;
|
|
242
242
|
this.host = new Host_1.default(options.config.hostAddress);
|
|
243
|
-
|
|
244
|
-
get idaContract() {
|
|
245
|
-
return new ethers_1.ethers.Contract(this.options.config.idaV1Address, IInstantDistributionAgreementV1_json_1.default.abi);
|
|
243
|
+
this.contract = new ethers_1.ethers.Contract(this.options.config.idaV1Address, IInstantDistributionAgreementV1_json_1.default.abi);
|
|
246
244
|
}
|
|
247
245
|
}
|
|
248
246
|
exports.default = InstantDistributionAgreementV1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstantDistributionAgreementV1.js","sourceRoot":"","sources":["../../src/InstantDistributionAgreementV1.ts"],"names":[],"mappings":";;;;;AAAA,mCAAgC;AAEhC,kDAA0B;AAE1B,uCAAoC;AACpC,sHAA4F;AAiB5F,mCAA2C;AAE3C,MAAM,YAAY,GAAG,IAAI,eAAM,CAAC,KAAK,CAAC,SAAS,CAC3C,8CAAkC,CAAC,GAAG,CACzC,CAAC;AAEF;;;GAGG;AACH,MAAqB,8BAA8B;
|
|
1
|
+
{"version":3,"file":"InstantDistributionAgreementV1.js","sourceRoot":"","sources":["../../src/InstantDistributionAgreementV1.ts"],"names":[],"mappings":";;;;;AAAA,mCAAgC;AAEhC,kDAA0B;AAE1B,uCAAoC;AACpC,sHAA4F;AAiB5F,mCAA2C;AAE3C,MAAM,YAAY,GAAG,IAAI,eAAM,CAAC,KAAK,CAAC,SAAS,CAC3C,8CAAkC,CAAC,GAAG,CACzC,CAAC;AAEF;;;GAGG;AACH,MAAqB,8BAA8B;IAK/C,YAAY,OAA4B;QASxC,iCAAiC;QAEjC;;;;;;;;WAQG;QACH,oBAAe,GAAG,KAAK,EACnB,MAA8B,EACJ,EAAE;YAC5B,MAAM,eAAe,GAAG,IAAA,wBAAgB,EAAC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AAC,QAAQ,CAC/B,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,EAChC,8CAAkC,CAAC,GAAG,CACN,CAAC;IACzC,CAAC;CAwSJ;AApTD,iDAoTC"}
|
package/dist/main/Operation.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { TransactionRequest } from "@ethersproject/abstract-provider";
|
|
|
2
2
|
import { ethers } from "ethers";
|
|
3
3
|
export declare type OperationType = "UNSUPPORTED" | "ERC20_APPROVE" | "ERC20_TRANSFER_FROM" | "SUPERTOKEN_UPGRADE" | "SUPERTOKEN_DOWNGRADE" | "SUPERFLUID_CALL_AGREEMENT" | "CALL_APP_ACTION";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Operation Helper Class
|
|
6
6
|
* @description A helper class to create `Operation` objects which can be executed or batched.
|
|
7
7
|
*/
|
|
8
8
|
export default class Operation {
|
|
@@ -10,26 +10,26 @@ export default class Operation {
|
|
|
10
10
|
readonly type: OperationType;
|
|
11
11
|
constructor(txn: Promise<ethers.PopulatedTransaction>, type: OperationType);
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Executes the operation via the provided signer.
|
|
14
14
|
* @description Populates all fields of the transaction, signs it and sends it to the network.
|
|
15
15
|
* @param signer The signer of the transacation
|
|
16
16
|
* @returns {ethers.providers.TransactionResponse} A TransactionResponse object which can be awaited
|
|
17
17
|
*/
|
|
18
18
|
exec: (signer: ethers.Signer) => Promise<ethers.providers.TransactionResponse>;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Get the populated transaction by awaiting `populateTransactionPromise`.
|
|
21
21
|
* @description Note that we need to populate the txn with the signer.
|
|
22
22
|
* @returns {Promise<TransactionRequest>}
|
|
23
23
|
*/
|
|
24
24
|
getPopulatedTransactionRequest: (signer: ethers.Signer) => Promise<TransactionRequest>;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Signs the populated transaction via the provided signer (what you intend on sending to the network).
|
|
27
27
|
* @param signer The signer of the transacation
|
|
28
28
|
* @returns {Promise<string>} Fully serialized, signed transaction
|
|
29
29
|
*/
|
|
30
30
|
getSignedTransaction: (signer: ethers.Signer) => Promise<string>;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Gets the transaction hash of the transaction.
|
|
33
33
|
* @description Calculates this by getting the keccak256 hash of the signedTxn.
|
|
34
34
|
* @param signer The signer of the transacation
|
|
35
35
|
* @returns {Promise<string>} The transaction hash of the transaction
|
package/dist/main/Operation.js
CHANGED
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const ethers_1 = require("ethers");
|
|
4
4
|
const SFError_1 = require("./SFError");
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Operation Helper Class
|
|
7
7
|
* @description A helper class to create `Operation` objects which can be executed or batched.
|
|
8
8
|
*/
|
|
9
9
|
class Operation {
|
|
10
10
|
constructor(txn, type) {
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Executes the operation via the provided signer.
|
|
13
13
|
* @description Populates all fields of the transaction, signs it and sends it to the network.
|
|
14
14
|
* @param signer The signer of the transacation
|
|
15
15
|
* @returns {ethers.providers.TransactionResponse} A TransactionResponse object which can be awaited
|
|
@@ -28,7 +28,7 @@ class Operation {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
31
|
+
* Get the populated transaction by awaiting `populateTransactionPromise`.
|
|
32
32
|
* @description Note that we need to populate the txn with the signer.
|
|
33
33
|
* @returns {Promise<TransactionRequest>}
|
|
34
34
|
*/
|
|
@@ -47,7 +47,7 @@ class Operation {
|
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
50
|
+
* Signs the populated transaction via the provided signer (what you intend on sending to the network).
|
|
51
51
|
* @param signer The signer of the transacation
|
|
52
52
|
* @returns {Promise<string>} Fully serialized, signed transaction
|
|
53
53
|
*/
|
|
@@ -66,7 +66,7 @@ class Operation {
|
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Gets the transaction hash of the transaction.
|
|
70
70
|
* @description Calculates this by getting the keccak256 hash of the signedTxn.
|
|
71
71
|
* @param signer The signer of the transacation
|
|
72
72
|
* @returns {Promise<string>} The transaction hash of the transaction
|
package/dist/main/Query.d.ts
CHANGED
|
@@ -10,18 +10,13 @@ export interface IQueryOptions {
|
|
|
10
10
|
readonly dataMode: DataMode;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Query Helper Class
|
|
14
14
|
* @description A helper class to create `Query` objects which can be used to query different data.
|
|
15
15
|
*/
|
|
16
16
|
export default class Query {
|
|
17
17
|
options: IQueryOptions;
|
|
18
18
|
subgraphClient: SubgraphClient;
|
|
19
19
|
constructor(options: IQueryOptions);
|
|
20
|
-
/**
|
|
21
|
-
* A recursive function to fetch all possible results of a paged query.
|
|
22
|
-
* @param pagedQuery A paginated query that takes {@link Paging} as input.
|
|
23
|
-
*/
|
|
24
|
-
listAllResults: <T extends ILightEntity>(pagedQuery: (paging: Paging) => Promise<PagedResult<T>>) => Promise<T[]>;
|
|
25
20
|
listAllSuperTokens: (filter: ISuperTokenRequestFilter, paging?: Paging, ordering?: Ordering<Token_OrderBy>) => Promise<PagedResult<ISuperToken>>;
|
|
26
21
|
listIndexes: (filter: IIndexRequestFilter, paging?: Paging, ordering?: Ordering<Index_OrderBy>) => Promise<PagedResult<IIndex>>;
|
|
27
22
|
listIndexSubscriptions: (filter: IIndexSubscriptionRequestFilter, paging?: Paging, ordering?: Ordering<IndexSubscription_OrderBy>) => Promise<PagedResult<IIndexSubscription>>;
|
|
@@ -30,4 +25,9 @@ export default class Query {
|
|
|
30
25
|
listEvents: (filter: IEventFilter, paging?: Paging, ordering?: Ordering<Event_OrderBy>) => Promise<PagedResult<AllEvents>>;
|
|
31
26
|
on(callback: (events: AllEvents[], unsubscribe: () => void) => void, ms: number, account?: string, timeout?: number): () => void;
|
|
32
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* A recursive function to fetch all possible results of a paged query.
|
|
30
|
+
* @param pagedQuery A paginated query that takes {@link Paging} as input.
|
|
31
|
+
*/
|
|
32
|
+
export declare const listAllResults: <T extends ILightEntity>(pagedQuery: (paging: Paging) => Promise<PagedResult<T>>) => Promise<T[]>;
|
|
33
33
|
//# sourceMappingURL=Query.d.ts.map
|
package/dist/main/Query.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Query.d.ts","sourceRoot":"","sources":["../../src/Query.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EACH,2BAA2B,EAC3B,MAAM,EACN,mBAAmB,EACnB,kBAAkB,EAClB,+BAA+B,EAC/B,0BAA0B,EAC1B,YAAY,EACZ,OAAO,EACP,oBAAoB,EACpB,WAAW,EACX,wBAAwB,EAC3B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAIH,WAAW,EACX,MAAM,EAET,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AA+B3D,OAAO,EACH,4BAA4B,EAC5B,aAAa,EACb,aAAa,EACb,yBAAyB,EACzB,cAAc,EACd,aAAa,EAChB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAWnC,MAAM,WAAW,aAAa;IAC1B,QAAQ,CAAC,6BAA6B,EAAE,MAAM,CAAC;IAC/C,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,KAAK;IACtB,OAAO,EAAE,aAAa,CAAC;IACvB,cAAc,EAAE,cAAc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