@superfluid-finance/sdk-core 0.3.3-dev.c77270b.0 → 0.3.3-dev.c9bc19b.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 +5988 -2000
- 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 +16 -7
- package/dist/main/Framework.d.ts.map +1 -1
- package/dist/main/Framework.js +36 -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 +229 -68
- 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 +939 -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 +633 -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 +957 -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 +16 -7
- package/dist/module/Framework.d.ts.map +1 -1
- package/dist/module/Framework.js +36 -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 +229 -68
- 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 +939 -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 +633 -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 +953 -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/module/Host.d.ts
CHANGED
|
@@ -2,14 +2,14 @@ import { ethers } from "ethers";
|
|
|
2
2
|
import Operation from "./Operation";
|
|
3
3
|
import { Superfluid } from "./typechain";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Host Helper Class
|
|
6
6
|
* @description A helper class which can be used as a standalone class to populate call agreement transactions.
|
|
7
7
|
*/
|
|
8
8
|
export default class Host {
|
|
9
|
-
|
|
9
|
+
contract: Superfluid;
|
|
10
10
|
constructor(hostAddress: string);
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Creates an Operation of the `callAgreement` function on the host contract.
|
|
13
13
|
* @param agreementAddress the agreement address (cfa or ida address)
|
|
14
14
|
* @param callData the encoded callData for the function
|
|
15
15
|
* @param userData any additional user data
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Host.d.ts","sourceRoot":"","sources":["../../src/Host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAa,MAAM,QAAQ,CAAC;AAE3C,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,IAAI;IACrB,
|
|
1
|
+
{"version":3,"file":"Host.d.ts","sourceRoot":"","sources":["../../src/Host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAa,MAAM,QAAQ,CAAC;AAE3C,OAAO,SAAS,MAAM,aAAa,CAAC;AAEpC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,IAAI;IACrB,QAAQ,EAAE,UAAU,CAAC;gBAET,WAAW,EAAE,MAAM;IAO/B;;;;;;;OAOG;IACH,0CAA0C,qBACpB,MAAM,YACd,MAAM,YACN,MAAM,GAAG,SAAS;;uBAE7B,SAAS,CAQV;CACL"}
|
package/dist/module/Host.js
CHANGED
|
@@ -2,13 +2,13 @@ import { ethers } from "ethers";
|
|
|
2
2
|
import Operation from "./Operation";
|
|
3
3
|
import SuperfluidABI from "./abi/Superfluid.json";
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Host Helper Class
|
|
6
6
|
* @description A helper class which can be used as a standalone class to populate call agreement transactions.
|
|
7
7
|
*/
|
|
8
8
|
export default class Host {
|
|
9
9
|
constructor(hostAddress) {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Creates an Operation of the `callAgreement` function on the host contract.
|
|
12
12
|
* @param agreementAddress the agreement address (cfa or ida address)
|
|
13
13
|
* @param callData the encoded callData for the function
|
|
14
14
|
* @param userData any additional user data
|
|
@@ -16,10 +16,10 @@ export default class Host {
|
|
|
16
16
|
* @returns {Operation} an `Operation` class
|
|
17
17
|
*/
|
|
18
18
|
this.populateCallAgreementTxnAndReturnOperation = (agreementAddress, callData, userData, overrides) => {
|
|
19
|
-
const txn = this.
|
|
19
|
+
const txn = this.contract.populateTransaction.callAgreement(agreementAddress, callData, userData || "0x", overrides || {});
|
|
20
20
|
return new Operation(txn, "SUPERFLUID_CALL_AGREEMENT");
|
|
21
21
|
};
|
|
22
|
-
this.
|
|
22
|
+
this.contract = new ethers.Contract(hostAddress, SuperfluidABI.abi);
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
25
|
//# sourceMappingURL=Host.js.map
|
package/dist/module/Host.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Host.js","sourceRoot":"","sources":["../../src/Host.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAa,MAAM,QAAQ,CAAC;AAE3C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAGlD;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,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,OAAO,EAAE,MAAM,EAAa,MAAM,QAAQ,CAAC;AAE3C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,aAAa,MAAM,uBAAuB,CAAC;AAGlD;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,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,SAAS,CAAC,GAAG,EAAE,2BAA2B,CAAC,CAAC;QAC3D,CAAC,CAAC;QA3BE,IAAI,CAAC,QAAQ,GAAG,IAAI,MAAM,CAAC,QAAQ,CAC/B,WAAW,EACX,aAAa,CAAC,GAAG,CACN,CAAC;IACpB,CAAC;CAwBJ"}
|
|
@@ -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"}
|
|
@@ -5,14 +5,14 @@ import IInstantDistributionAgreementV1ABI from "./abi/IInstantDistributionAgreem
|
|
|
5
5
|
import { normalizeAddress } from "./utils";
|
|
6
6
|
const idaInterface = new ethers.utils.Interface(IInstantDistributionAgreementV1ABI.abi);
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Instant Distribution Agreement V1 Helper Class
|
|
9
9
|
* @description A helper class to interact with the IDAV1 contract.
|
|
10
10
|
*/
|
|
11
11
|
export default class InstantDistributionAgreementV1 {
|
|
12
12
|
constructor(options) {
|
|
13
|
-
|
|
13
|
+
/** ### IDA Read Functions ### */
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Get the details of a `Subscription`.
|
|
16
16
|
* @param superToken the superToken of the agreement
|
|
17
17
|
* @param publisher the address of the publisher of the index
|
|
18
18
|
* @param indexId the index id
|
|
@@ -20,14 +20,14 @@ export default class InstantDistributionAgreementV1 {
|
|
|
20
20
|
* @param providerOrSigner a provider or signer object
|
|
21
21
|
* @returns {Promise<IWeb3Subscription>} Web3 Subscription object
|
|
22
22
|
*/
|
|
23
|
-
this.getSubscription = async (
|
|
24
|
-
const normalizedToken = normalizeAddress(superToken);
|
|
25
|
-
const normalizedPublisher = normalizeAddress(publisher);
|
|
26
|
-
const normalizedSubscriber = normalizeAddress(subscriber);
|
|
23
|
+
this.getSubscription = async (params) => {
|
|
24
|
+
const normalizedToken = normalizeAddress(params.superToken);
|
|
25
|
+
const normalizedPublisher = normalizeAddress(params.publisher);
|
|
26
|
+
const normalizedSubscriber = normalizeAddress(params.subscriber);
|
|
27
27
|
try {
|
|
28
|
-
const subscription = await this.
|
|
29
|
-
.connect(providerOrSigner)
|
|
30
|
-
.getSubscription(normalizedToken, normalizedPublisher, indexId, normalizedSubscriber);
|
|
28
|
+
const subscription = await this.contract
|
|
29
|
+
.connect(params.providerOrSigner)
|
|
30
|
+
.getSubscription(normalizedToken, normalizedPublisher, params.indexId, normalizedSubscriber);
|
|
31
31
|
return {
|
|
32
32
|
exist: subscription.exist,
|
|
33
33
|
approved: subscription.approved,
|
|
@@ -44,20 +44,20 @@ export default class InstantDistributionAgreementV1 {
|
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* Get the details of an `Index`.
|
|
48
48
|
* @param superToken the superToken of the agreement
|
|
49
49
|
* @param publisher the address of the publisher of the index
|
|
50
50
|
* @param indexId the index id
|
|
51
51
|
* @param providerOrSigner a provider or signer object
|
|
52
52
|
* @returns {Promise<IWeb3Index>} Web3 Index object
|
|
53
53
|
*/
|
|
54
|
-
this.getIndex = async (
|
|
55
|
-
const normalizedToken = normalizeAddress(superToken);
|
|
56
|
-
const normalizedPublisher = normalizeAddress(publisher);
|
|
54
|
+
this.getIndex = async (params) => {
|
|
55
|
+
const normalizedToken = normalizeAddress(params.superToken);
|
|
56
|
+
const normalizedPublisher = normalizeAddress(params.publisher);
|
|
57
57
|
try {
|
|
58
|
-
const index = await this.
|
|
59
|
-
.connect(providerOrSigner)
|
|
60
|
-
.getIndex(normalizedToken, normalizedPublisher, indexId);
|
|
58
|
+
const index = await this.contract
|
|
59
|
+
.connect(params.providerOrSigner)
|
|
60
|
+
.getIndex(normalizedToken, normalizedPublisher, params.indexId);
|
|
61
61
|
return {
|
|
62
62
|
exist: index.exist,
|
|
63
63
|
indexValue: index.indexValue.toString(),
|
|
@@ -73,26 +73,26 @@ export default class InstantDistributionAgreementV1 {
|
|
|
73
73
|
});
|
|
74
74
|
}
|
|
75
75
|
};
|
|
76
|
-
|
|
76
|
+
/** ### IDA Write Functions ### */
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* Creates an IDA Index.
|
|
79
79
|
* @param indexId The id of the index.
|
|
80
80
|
* @param superToken The address of the `index` superToken.
|
|
81
81
|
* @param userData Extra user data provided.
|
|
82
82
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
83
83
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
84
84
|
*/
|
|
85
|
-
this.createIndex = (
|
|
86
|
-
const normalizedToken = normalizeAddress(superToken);
|
|
85
|
+
this.createIndex = (params) => {
|
|
86
|
+
const normalizedToken = normalizeAddress(params.superToken);
|
|
87
87
|
const callData = idaInterface.encodeFunctionData("createIndex", [
|
|
88
88
|
normalizedToken,
|
|
89
|
-
indexId,
|
|
89
|
+
params.indexId,
|
|
90
90
|
"0x",
|
|
91
91
|
]);
|
|
92
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
92
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
93
93
|
};
|
|
94
94
|
/**
|
|
95
|
-
*
|
|
95
|
+
* Distributes `amount` of `superToken` to an index
|
|
96
96
|
* @param indexId The id of the index.
|
|
97
97
|
* @param amount The amount of `superToken` to be distributed.
|
|
98
98
|
* @param superToken The superToken to be distributed.
|
|
@@ -100,18 +100,18 @@ export default class InstantDistributionAgreementV1 {
|
|
|
100
100
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
101
101
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
102
102
|
*/
|
|
103
|
-
this.distribute = (
|
|
104
|
-
const normalizedToken = normalizeAddress(superToken);
|
|
103
|
+
this.distribute = (params) => {
|
|
104
|
+
const normalizedToken = normalizeAddress(params.superToken);
|
|
105
105
|
const callData = idaInterface.encodeFunctionData("distribute", [
|
|
106
106
|
normalizedToken,
|
|
107
|
-
indexId,
|
|
108
|
-
amount,
|
|
107
|
+
params.indexId,
|
|
108
|
+
params.amount,
|
|
109
109
|
"0x",
|
|
110
110
|
]);
|
|
111
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
111
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
112
112
|
};
|
|
113
113
|
/**
|
|
114
|
-
*
|
|
114
|
+
* Updates the `indexValue` of an index.
|
|
115
115
|
* @description NOTE: It has the same effect as `distribute`, but is closer to the low level data structure of the index.
|
|
116
116
|
* @param indexId The id of the index.
|
|
117
117
|
* @param indexValue The new indexValue.
|
|
@@ -120,18 +120,18 @@ export default class InstantDistributionAgreementV1 {
|
|
|
120
120
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
121
121
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
122
122
|
*/
|
|
123
|
-
this.updateIndexValue = (
|
|
124
|
-
const normalizedToken = normalizeAddress(superToken);
|
|
123
|
+
this.updateIndexValue = (params) => {
|
|
124
|
+
const normalizedToken = normalizeAddress(params.superToken);
|
|
125
125
|
const callData = idaInterface.encodeFunctionData("updateIndex", [
|
|
126
126
|
normalizedToken,
|
|
127
|
-
indexId,
|
|
128
|
-
indexValue,
|
|
127
|
+
params.indexId,
|
|
128
|
+
params.indexValue,
|
|
129
129
|
"0x",
|
|
130
130
|
]);
|
|
131
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
131
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
132
132
|
};
|
|
133
133
|
/**
|
|
134
|
-
*
|
|
134
|
+
* Updates the `units` allocated to a Subscription.
|
|
135
135
|
* @param indexId The id of the index.
|
|
136
136
|
* @param superToken The superToken of the index.
|
|
137
137
|
* @param subscriber The subscriber address whose units you want to update.
|
|
@@ -140,20 +140,20 @@ export default class InstantDistributionAgreementV1 {
|
|
|
140
140
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
141
141
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
142
142
|
*/
|
|
143
|
-
this.updateSubscriptionUnits = (
|
|
144
|
-
const normalizedToken = normalizeAddress(superToken);
|
|
145
|
-
const normalizedSubscriber = normalizeAddress(subscriber);
|
|
143
|
+
this.updateSubscriptionUnits = (params) => {
|
|
144
|
+
const normalizedToken = normalizeAddress(params.superToken);
|
|
145
|
+
const normalizedSubscriber = normalizeAddress(params.subscriber);
|
|
146
146
|
const callData = idaInterface.encodeFunctionData("updateSubscription", [
|
|
147
147
|
normalizedToken,
|
|
148
|
-
indexId,
|
|
148
|
+
params.indexId,
|
|
149
149
|
normalizedSubscriber,
|
|
150
|
-
units,
|
|
150
|
+
params.units,
|
|
151
151
|
"0x",
|
|
152
152
|
]);
|
|
153
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
153
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
154
154
|
};
|
|
155
155
|
/**
|
|
156
|
-
*
|
|
156
|
+
* Approves a Subscription, so the Subscriber won't need to claim tokens when the Publisher distributes.
|
|
157
157
|
* @param indexId The id of the index.
|
|
158
158
|
* @param superToken The superToken of the index.
|
|
159
159
|
* @param publisher The publisher of the index you want to approve.
|
|
@@ -161,14 +161,14 @@ export default class InstantDistributionAgreementV1 {
|
|
|
161
161
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
162
162
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
163
163
|
*/
|
|
164
|
-
this.approveSubscription = (
|
|
165
|
-
const normalizedPublisher = normalizeAddress(publisher);
|
|
166
|
-
const normalizedToken = normalizeAddress(superToken);
|
|
167
|
-
const callData = idaInterface.encodeFunctionData("approveSubscription", [normalizedToken, normalizedPublisher, indexId, "0x"]);
|
|
168
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
164
|
+
this.approveSubscription = (params) => {
|
|
165
|
+
const normalizedPublisher = normalizeAddress(params.publisher);
|
|
166
|
+
const normalizedToken = normalizeAddress(params.superToken);
|
|
167
|
+
const callData = idaInterface.encodeFunctionData("approveSubscription", [normalizedToken, normalizedPublisher, params.indexId, "0x"]);
|
|
168
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
169
169
|
};
|
|
170
170
|
/**
|
|
171
|
-
*
|
|
171
|
+
* Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher distributres.
|
|
172
172
|
* @param indexId The id of the index.
|
|
173
173
|
* @param superToken The superToken of the index.
|
|
174
174
|
* @param subscriber The subscriber address whose subscription you want to revoke.
|
|
@@ -176,19 +176,19 @@ export default class InstantDistributionAgreementV1 {
|
|
|
176
176
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
177
177
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
178
178
|
*/
|
|
179
|
-
this.revokeSubscription = (
|
|
180
|
-
const normalizedPublisher = normalizeAddress(publisher);
|
|
181
|
-
const normalizedToken = normalizeAddress(superToken);
|
|
179
|
+
this.revokeSubscription = (params) => {
|
|
180
|
+
const normalizedPublisher = normalizeAddress(params.publisher);
|
|
181
|
+
const normalizedToken = normalizeAddress(params.superToken);
|
|
182
182
|
const callData = idaInterface.encodeFunctionData("revokeSubscription", [
|
|
183
183
|
normalizedToken,
|
|
184
184
|
normalizedPublisher,
|
|
185
|
-
indexId,
|
|
185
|
+
params.indexId,
|
|
186
186
|
"0x",
|
|
187
187
|
]);
|
|
188
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
188
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
189
189
|
};
|
|
190
190
|
/**
|
|
191
|
-
*
|
|
191
|
+
* Deletes a Subscription by setting the `units` allocated to the Subscriber to 0.
|
|
192
192
|
* @param indexId The id of the index.
|
|
193
193
|
* @param superToken The superToken of the index.
|
|
194
194
|
* @param subscriber The subscriber address whose subscription you want to delete.
|
|
@@ -197,21 +197,21 @@ export default class InstantDistributionAgreementV1 {
|
|
|
197
197
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
198
198
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
199
199
|
*/
|
|
200
|
-
this.deleteSubscription = (
|
|
201
|
-
const normalizedPublisher = normalizeAddress(publisher);
|
|
202
|
-
const normalizedToken = normalizeAddress(superToken);
|
|
203
|
-
const normalizedSubscriber = normalizeAddress(subscriber);
|
|
200
|
+
this.deleteSubscription = (params) => {
|
|
201
|
+
const normalizedPublisher = normalizeAddress(params.publisher);
|
|
202
|
+
const normalizedToken = normalizeAddress(params.superToken);
|
|
203
|
+
const normalizedSubscriber = normalizeAddress(params.subscriber);
|
|
204
204
|
const callData = idaInterface.encodeFunctionData("deleteSubscription", [
|
|
205
205
|
normalizedToken,
|
|
206
206
|
normalizedPublisher,
|
|
207
|
-
indexId,
|
|
207
|
+
params.indexId,
|
|
208
208
|
normalizedSubscriber,
|
|
209
209
|
"0x",
|
|
210
210
|
]);
|
|
211
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
211
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
212
212
|
};
|
|
213
213
|
/**
|
|
214
|
-
*
|
|
214
|
+
* Claims any pending tokens allocated to the Subscription (unapproved).
|
|
215
215
|
* @param indexId The id of the index.
|
|
216
216
|
* @param superToken The superToken of the index.
|
|
217
217
|
* @param subscriber The subscriber address whose subscription you want to delete.
|
|
@@ -220,24 +220,22 @@ export default class InstantDistributionAgreementV1 {
|
|
|
220
220
|
* @param overrides ethers overrides object for more control over the transaction sent.
|
|
221
221
|
* @returns {Operation} An instance of Operation which can be executed or batched.
|
|
222
222
|
*/
|
|
223
|
-
this.claim = (
|
|
224
|
-
const normalizedPublisher = normalizeAddress(publisher);
|
|
225
|
-
const normalizedToken = normalizeAddress(superToken);
|
|
226
|
-
const normalizedSubscriber = normalizeAddress(subscriber);
|
|
223
|
+
this.claim = (params) => {
|
|
224
|
+
const normalizedPublisher = normalizeAddress(params.publisher);
|
|
225
|
+
const normalizedToken = normalizeAddress(params.superToken);
|
|
226
|
+
const normalizedSubscriber = normalizeAddress(params.subscriber);
|
|
227
227
|
const callData = idaInterface.encodeFunctionData("claim", [
|
|
228
228
|
normalizedToken,
|
|
229
229
|
normalizedPublisher,
|
|
230
|
-
indexId,
|
|
230
|
+
params.indexId,
|
|
231
231
|
normalizedSubscriber,
|
|
232
232
|
"0x",
|
|
233
233
|
]);
|
|
234
|
-
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, userData, overrides);
|
|
234
|
+
return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.idaV1Address, callData, params.userData, params.overrides);
|
|
235
235
|
};
|
|
236
236
|
this.options = options;
|
|
237
237
|
this.host = new Host(options.config.hostAddress);
|
|
238
|
-
|
|
239
|
-
get idaContract() {
|
|
240
|
-
return new ethers.Contract(this.options.config.idaV1Address, IInstantDistributionAgreementV1ABI.abi);
|
|
238
|
+
this.contract = new ethers.Contract(this.options.config.idaV1Address, IInstantDistributionAgreementV1ABI.abi);
|
|
241
239
|
}
|
|
242
240
|
}
|
|
243
241
|
//# sourceMappingURL=InstantDistributionAgreementV1.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InstantDistributionAgreementV1.js","sourceRoot":"","sources":["../../src/InstantDistributionAgreementV1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,kCAAkC,MAAM,4CAA4C,CAAC;AAiB5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,SAAS,CAC3C,kCAAkC,CAAC,GAAG,CACzC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,8BAA8B;
|
|
1
|
+
{"version":3,"file":"InstantDistributionAgreementV1.js","sourceRoot":"","sources":["../../src/InstantDistributionAgreementV1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,kCAAkC,MAAM,4CAA4C,CAAC;AAiB5F,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,SAAS,CAC3C,kCAAkC,CAAC,GAAG,CACzC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,8BAA8B;IAK/C,YAAY,OAA4B;QASxC,iCAAiC;QAEjC;;;;;;;;WAQG;QACH,oBAAe,GAAG,KAAK,EACnB,MAA8B,EACJ,EAAE;YAC5B,MAAM,eAAe,G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IACzC,CAAC;CAwSJ"}
|
|
@@ -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/module/Operation.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ethers } from "ethers";
|
|
2
2
|
import { SFError } from "./SFError";
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
4
|
+
* Operation Helper Class
|
|
5
5
|
* @description A helper class to create `Operation` objects which can be executed or batched.
|
|
6
6
|
*/
|
|
7
7
|
export default class Operation {
|
|
8
8
|
constructor(txn, type) {
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Executes the operation via the provided signer.
|
|
11
11
|
* @description Populates all fields of the transaction, signs it and sends it to the network.
|
|
12
12
|
* @param signer The signer of the transacation
|
|
13
13
|
* @returns {ethers.providers.TransactionResponse} A TransactionResponse object which can be awaited
|
|
@@ -26,7 +26,7 @@ export default class Operation {
|
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Get the populated transaction by awaiting `populateTransactionPromise`.
|
|
30
30
|
* @description Note that we need to populate the txn with the signer.
|
|
31
31
|
* @returns {Promise<TransactionRequest>}
|
|
32
32
|
*/
|
|
@@ -45,7 +45,7 @@ export default class Operation {
|
|
|
45
45
|
}
|
|
46
46
|
};
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Signs the populated transaction via the provided signer (what you intend on sending to the network).
|
|
49
49
|
* @param signer The signer of the transacation
|
|
50
50
|
* @returns {Promise<string>} Fully serialized, signed transaction
|
|
51
51
|
*/
|
|
@@ -64,7 +64,7 @@ export default class Operation {
|
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
/**
|
|
67
|
-
*
|
|
67
|
+
* Gets the transaction hash of the transaction.
|
|
68
68
|
* @description Calculates this by getting the keccak256 hash of the signedTxn.
|
|
69
69
|
* @param signer The signer of the transacation
|
|
70
70
|
* @returns {Promise<string>} The transaction hash of the transaction
|